]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'en/sequencer-merge-labels'
authorJunio C Hamano <gitster@pobox.com>
Wed, 19 Aug 2020 23:14:47 +0000 (16:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 Aug 2020 23:14:47 +0000 (16:14 -0700)
The commit labels used to explain each side of conflicted hunks
placed by the sequencer machinery have been made more readable by
humans.

* en/sequencer-merge-labels:
  sequencer: avoid garbled merge machinery messages due to commit labels

sequencer.c
t/t3404-rebase-interactive.sh
t/t3507-cherry-pick-conflict.sh

index cc3f8fa88ea96df3480a8721a20fa61a08c2114c..8a25e28cad7d1e47938fa0e13f93934e0c8f1d17 100644 (file)
@@ -355,7 +355,7 @@ static int get_message(struct commit *commit, struct commit_message *out)
        subject_len = find_commit_subject(out->message, &subject);
 
        out->subject = xmemdupz(subject, subject_len);
-       out->label = xstrfmt("%s... %s", abbrev, out->subject);
+       out->label = xstrfmt("%s (%s)", abbrev, out->subject);
        out->parent_label = xstrfmt("parent of %s", out->label);
 
        return 0;
index 9744e88760c9b1ba2621c82e2474e44c8f16e9a7..61d202834241df9dd6300f91c23dadd7a986af6f 100755 (executable)
@@ -256,7 +256,7 @@ test_expect_success 'stop on conflicting pick' '
        D
        =======
        G
-       >>>>>>> $commit... G
+       >>>>>>> $commit (G)
        EOF
        git tag new-branch1 &&
        test_must_fail git rebase -i master &&
index f107622a9e8c2daf4943f97834c4a05917aac6c8..a21adcf0e43a6d6003e60809a3dc8f20772fef2e 100755 (executable)
@@ -283,12 +283,12 @@ test_expect_success 'failed cherry-pick describes conflict in work tree' '
        a
        =======
        c
-       >>>>>>> objid picked
+       >>>>>>> objid (picked)
        EOF
 
        test_must_fail git cherry-pick picked &&
 
-       sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
+       sed "s/[a-f0-9]* (/objid (/" foo >actual &&
        test_cmp expected actual
 '
 
@@ -298,16 +298,16 @@ test_expect_success 'diff3 -m style' '
        cat <<-EOF >expected &&
        <<<<<<< HEAD
        a
-       ||||||| parent of objid picked
+       ||||||| parent of objid (picked)
        b
        =======
        c
-       >>>>>>> objid picked
+       >>>>>>> objid (picked)
        EOF
 
        test_must_fail git cherry-pick picked &&
 
-       sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
+       sed "s/[a-f0-9]* (/objid (/" foo >actual &&
        test_cmp expected actual
 '
 
@@ -319,7 +319,7 @@ test_expect_success 'revert also handles conflicts sanely' '
        a
        =======
        b
-       >>>>>>> parent of objid picked
+       >>>>>>> parent of objid (picked)
        EOF
        {
                git checkout picked -- foo &&
@@ -345,7 +345,7 @@ test_expect_success 'revert also handles conflicts sanely' '
        test_must_fail git update-index --refresh -q &&
        test_must_fail git diff-index --exit-code HEAD &&
        test_cmp expected-stages actual-stages &&
-       sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
+       sed "s/[a-f0-9]* (/objid (/" foo >actual &&
        test_cmp expected actual
 '
 
@@ -429,16 +429,16 @@ test_expect_success 'revert conflict, diff3 -m style' '
        cat <<-EOF >expected &&
        <<<<<<< HEAD
        a
-       ||||||| objid picked
+       ||||||| objid (picked)
        c
        =======
        b
-       >>>>>>> parent of objid picked
+       >>>>>>> parent of objid (picked)
        EOF
 
        test_must_fail git revert picked &&
 
-       sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
+       sed "s/[a-f0-9]* (/objid (/" foo >actual &&
        test_cmp expected actual
 '