Skip to content

Commit 6cceea1

Browse files
committed
Merge branch 'en/sequencer-merge-labels'
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
2 parents 9cdf86b + 7d056de commit 6cceea1

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

sequencer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ static int get_message(struct commit *commit, struct commit_message *out)
355355
subject_len = find_commit_subject(out->message, &subject);
356356

357357
out->subject = xmemdupz(subject, subject_len);
358-
out->label = xstrfmt("%s... %s", abbrev, out->subject);
358+
out->label = xstrfmt("%s (%s)", abbrev, out->subject);
359359
out->parent_label = xstrfmt("parent of %s", out->label);
360360

361361
return 0;

t/t3404-rebase-interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ test_expect_success 'stop on conflicting pick' '
256256
D
257257
=======
258258
G
259-
>>>>>>> $commit... G
259+
>>>>>>> $commit (G)
260260
EOF
261261
git tag new-branch1 &&
262262
test_must_fail git rebase -i master &&

t/t3507-cherry-pick-conflict.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,12 @@ test_expect_success 'failed cherry-pick describes conflict in work tree' '
283283
a
284284
=======
285285
c
286-
>>>>>>> objid picked
286+
>>>>>>> objid (picked)
287287
EOF
288288
289289
test_must_fail git cherry-pick picked &&
290290
291-
sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
291+
sed "s/[a-f0-9]* (/objid (/" foo >actual &&
292292
test_cmp expected actual
293293
'
294294

@@ -298,16 +298,16 @@ test_expect_success 'diff3 -m style' '
298298
cat <<-EOF >expected &&
299299
<<<<<<< HEAD
300300
a
301-
||||||| parent of objid picked
301+
||||||| parent of objid (picked)
302302
b
303303
=======
304304
c
305-
>>>>>>> objid picked
305+
>>>>>>> objid (picked)
306306
EOF
307307
308308
test_must_fail git cherry-pick picked &&
309309
310-
sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
310+
sed "s/[a-f0-9]* (/objid (/" foo >actual &&
311311
test_cmp expected actual
312312
'
313313

@@ -319,7 +319,7 @@ test_expect_success 'revert also handles conflicts sanely' '
319319
a
320320
=======
321321
b
322-
>>>>>>> parent of objid picked
322+
>>>>>>> parent of objid (picked)
323323
EOF
324324
{
325325
git checkout picked -- foo &&
@@ -345,7 +345,7 @@ test_expect_success 'revert also handles conflicts sanely' '
345345
test_must_fail git update-index --refresh -q &&
346346
test_must_fail git diff-index --exit-code HEAD &&
347347
test_cmp expected-stages actual-stages &&
348-
sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
348+
sed "s/[a-f0-9]* (/objid (/" foo >actual &&
349349
test_cmp expected actual
350350
'
351351

@@ -429,16 +429,16 @@ test_expect_success 'revert conflict, diff3 -m style' '
429429
cat <<-EOF >expected &&
430430
<<<<<<< HEAD
431431
a
432-
||||||| objid picked
432+
||||||| objid (picked)
433433
c
434434
=======
435435
b
436-
>>>>>>> parent of objid picked
436+
>>>>>>> parent of objid (picked)
437437
EOF
438438
439439
test_must_fail git revert picked &&
440440
441-
sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
441+
sed "s/[a-f0-9]* (/objid (/" foo >actual &&
442442
test_cmp expected actual
443443
'
444444

0 commit comments

Comments
 (0)