summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2022-07-19 18:33:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-07-19 19:49:04 (GMT)
commit3113fedaeb67eed4c46ef7bdd670b8406317a303 (patch)
tree8bc5de79a9222aa73d7a9f40f3878e17afe8c42a /t
parentb3b1a21d1a5df87e81fa8b53c6c3cf9760ca12d4 (diff)
downloadgit-3113fedaeb67eed4c46ef7bdd670b8406317a303.zip
git-3113fedaeb67eed4c46ef7bdd670b8406317a303.tar.gz
git-3113fedaeb67eed4c46ef7bdd670b8406317a303.tar.bz2
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 <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3404-rebase-interactive.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index bebf9b4..1a27bb0 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
)
'