summaryrefslogtreecommitdiff
path: root/t/t3903-stash.sh
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2017-02-19 11:03:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-20 07:47:41 (GMT)
commitf5727e26e44dbbf564034d3993d4d2f65dacd6fb (patch)
tree70088d2b9eb37ec83f757886bf69c1e8cc08d3fe /t/t3903-stash.sh
parent20a7e06172fe054eac5a2f48932feb5ff5074919 (diff)
downloadgit-f5727e26e44dbbf564034d3993d4d2f65dacd6fb.zip
git-f5727e26e44dbbf564034d3993d4d2f65dacd6fb.tar.gz
git-f5727e26e44dbbf564034d3993d4d2f65dacd6fb.tar.bz2
stash: introduce push verb
Introduce a new git stash push verb in addition to git stash save. The push verb is used to transition from the current command line arguments to a more conventional way, in which the message is given as an argument to the -m option. This allows us to have pathspecs at the end of the command line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-xt/t3903-stash.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 2de3e18..3577115 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -775,4 +775,13 @@ test_expect_success 'stash is not confused by partial renames' '
test_path_is_missing file
'
+test_expect_success 'push -m shows right message' '
+ >foo &&
+ git add foo &&
+ git stash push -m "test message" &&
+ echo "stash@{0}: On master: test message" >expect &&
+ git stash list -1 >actual &&
+ test_cmp expect actual
+'
+
test_done