diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-03-20 19:45:21 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-20 20:36:11 -0700 |
commit | d68565402a69fac3fe0e0653718feca7c80c178b (patch) | |
tree | 9a7d6ac8232e57693d63e17ad5c9e61fcbcc8023 /t/t3507-cherry-pick-conflict.sh | |
parent | 137c6eaa885a421346f0a5abbc3cc4903671fbeb (diff) | |
download | git-d68565402a69fac3fe0e0653718feca7c80c178b.tar.gz |
revert: clarify label on conflict hunks
When reverting a commit, the commit being merged is not the commit
to revert itself but its parent. Add “parent of” to the conflict
hunk label to make this more clear.
The conflict hunk labels are all pieces of a single string written in
the new get_message() function. Avoid some complication by using
mempcpy to advance a pointer as the result is written.
Also free the corresponding temporary buffer (it was leaked before).
This is not important because it is a small one-time allocation. It
would become a memory leak if unnoticed when libifying revert.
This patch uses calls to strlen() instead of integer constants in some
places. GCC will compute the length at compile time; I am not sure
about other compilers, but this is not performance-critical anyway.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3507-cherry-pick-conflict.sh')
-rw-r--r-- | t/t3507-cherry-pick-conflict.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh index e8563560cb..6a20817377 100644 --- a/t/t3507-cherry-pick-conflict.sh +++ b/t/t3507-cherry-pick-conflict.sh @@ -138,7 +138,7 @@ test_expect_success 'revert also handles conflicts sanely' ' a ======= b - >>>>>>> objid picked + >>>>>>> parent of objid picked EOF { git checkout picked -- foo && @@ -183,7 +183,7 @@ test_expect_success 'revert conflict, diff3 -m style' ' c ======= b - >>>>>>> objid picked + >>>>>>> parent of objid picked EOF git update-index --refresh && |