From 3113fedaeb67eed4c46ef7bdd670b8406317a303 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Tue, 19 Jul 2022 18:33:42 +0000 Subject: rebase: add rebase.updateRefs config option The previous change added the --update-refs command-line option. For users who always want this mode, create the rebase.updateRefs config option which behaves the same way as rebase.autoSquash does with the --autosquash option. Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- t/t3404-rebase-interactive.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 't/t3404-rebase-interactive.sh') diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index bebf9b4def..1a27bb0626 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1772,6 +1772,12 @@ test_expect_success '--update-refs adds label and update-ref commands' ' EOF test_must_fail git rebase -i --autosquash --update-refs primary >todo && + test_cmp expect todo && + + test_must_fail git -c rebase.autosquash=true \ + -c rebase.updaterefs=true \ + rebase -i primary >todo && + test_cmp expect todo ) ' @@ -1813,6 +1819,14 @@ test_expect_success '--update-refs adds commands with --rebase-merges' ' --rebase-merges=rebase-cousins \ --update-refs primary >todo && + test_cmp expect todo && + + test_must_fail git -c rebase.autosquash=true \ + -c rebase.updaterefs=true \ + rebase -i \ + --rebase-merges=rebase-cousins \ + primary >todo && + test_cmp expect todo ) ' -- cgit v1.2.3