aboutsummaryrefslogtreecommitdiff
path: root/t/t7512-status-help.sh
diff options
context:
space:
mode:
authorRalf Thielow <ralf.thielow@gmail.com>2013-10-11 17:58:37 +0200
committerJonathan Nieder <jrnieder@gmail.com>2013-10-11 10:42:45 -0700
commitbffd8098705ffcfeb267951dcdd4e49dd188a7bb (patch)
treed8b107469d52e44ae8fffd0fd2b8125fc35c390b /t/t7512-status-help.sh
parent59c222052801a55bb40a78378ea19c6b7c4ec45d (diff)
downloadgit-bffd8098705ffcfeb267951dcdd4e49dd188a7bb.tar.gz
git-bffd8098705ffcfeb267951dcdd4e49dd188a7bb.tar.xz
status: show commit sha1 in "You are currently cherry-picking" message
Especially helpful when cherry-picking multiple commits. Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 't/t7512-status-help.sh')
-rwxr-xr-xt/t7512-status-help.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh
index 9905d43c7..3cec57af1 100755
--- a/t/t7512-status-help.sh
+++ b/t/t7512-status-help.sh
@@ -626,9 +626,10 @@ test_expect_success 'prepare for cherry-pick conflicts' '
test_expect_success 'status when cherry-picking before resolving conflicts' '
test_when_finished "git cherry-pick --abort" &&
test_must_fail git cherry-pick cherry_branch_second &&
- cat >expected <<\EOF &&
+ TO_CHERRY_PICK=$(git rev-parse --short CHERRY_PICK_HEAD) &&
+ cat >expected <<EOF &&
On branch cherry_branch
-You are currently cherry-picking.
+You are currently cherry-picking commit $TO_CHERRY_PICK.
(fix conflicts and run "git cherry-pick --continue")
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
@@ -648,11 +649,12 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '
git reset --hard cherry_branch &&
test_when_finished "git cherry-pick --abort" &&
test_must_fail git cherry-pick cherry_branch_second &&
+ TO_CHERRY_PICK=$(git rev-parse --short CHERRY_PICK_HEAD) &&
echo end >main.txt &&
git add main.txt &&
- cat >expected <<\EOF &&
+ cat >expected <<EOF &&
On branch cherry_branch
-You are currently cherry-picking.
+You are currently cherry-picking commit $TO_CHERRY_PICK.
(all conflicts fixed: run "git cherry-pick --continue")
(use "git cherry-pick --abort" to cancel the cherry-pick operation)