Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoan Tran Cong Danh <congdanhqx@gmail.com>2019-11-18 14:57:47 +0300
committerJunio C Hamano <gitster@pobox.com>2019-11-20 05:53:57 +0300
commite02058a72967b18bd906674de6191f42d03b0763 (patch)
treed5f2580ad5866c767ad05111f5ae096b054b8ee1 /t/t3430-rebase-merges.sh
parentcd5522271f6b985114b33332e148bff2283b0440 (diff)
sequencer: handle rebase-merges for "onto" message
In order to work correctly, git-rebase --rebase-merges needs to make initial todo list with unique labels. Those unique labels is being handled by employing a hashmap and appending an unique number if any duplicate is found. But, we forget that beside those labels for side branches, we also have a special label `onto' for our so-called new-base. In a special case that any of those labels for side branches named `onto', git will run into trouble. Correct it. Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3430-rebase-merges.sh')
-rwxr-xr-xt/t3430-rebase-merges.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh
index f728aba995..4e2c0ede51 100755
--- a/t/t3430-rebase-merges.sh
+++ b/t/t3430-rebase-merges.sh
@@ -474,4 +474,25 @@ test_expect_success '--rebase-merges with commit that can generate bad character
git rebase --rebase-merges --force-rebase E
'
+test_expect_success '--rebase-merges with message matched with onto label' '
+ git checkout -b onto-label E &&
+ git merge -m onto G &&
+ git rebase --rebase-merges --force-rebase E &&
+ test_cmp_graph <<-\EOF
+ * onto
+ |\
+ | * G
+ | * F
+ * | E
+ |\ \
+ | * | B
+ * | | D
+ | |/
+ |/|
+ * | C
+ |/
+ * A
+ EOF
+'
+
test_done