Code

cherry-pick: No advice to commit if --no-commit
authorPhil Hord <hordp@cisco.com>
Wed, 22 Feb 2012 00:44:17 +0000 (19:44 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Feb 2012 19:13:43 +0000 (11:13 -0800)
commited727b192bb3506ee7904c1c9e8370d6b4ecaf5d
treede21fef09f9d9bcbc64f28b194d0b23c3f9b46e4
parent7010146f90abf0e4954690f6cd38a8463786fec7
cherry-pick: No advice to commit if --no-commit

When cherry-pick fails it offers a helpful hint about how to
proceed.  The hint tells the user how to do the cleanup
needed by the conflicted cherry-pick and finish the job after
conflict resolution.  In case of cherry-pick --no-commit, the
hint goes too far. It tells the user to finish up with
'git commit'.  That is not what this git-cherry-pick was
trying to do in the first place.

Restrict the hint in case of --no-commit to avoid giving this
extra advice.

Also, add a test verifying the reduced hint for the --no-commit
version of cherry-pick.

Signed-off-by: Phil Hord <hordp@cisco.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
t/t3507-cherry-pick-conflict.sh