From: Phil Hord <phil.hord@gmail.com>
To: Git <git@vger.kernel.org>
Cc: David Turner <dturner@twopensource.com>, Phil Hord <phil.hord@gmail.com>
Subject: [PATCH v2 2/2] stash-store: add failing test for same-ref
Date: Wed, 22 Nov 2017 13:28:02 -0800 [thread overview]
Message-ID: <20171122212802.7068-1-phil.hord@gmail.com> (raw)
stash-store cannot create a new stash with the same ref as stash@{0}. No
error is returned even though no new stash log is created. Add a failing
test to track.
Signed-off-by: Phil Hord <phil.hord@gmail.com>
---
t/t3903-stash.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 279e31717..7d511afd3 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -813,6 +813,17 @@ test_expect_success 'push -m also works without space' '
test_cmp expect actual
'
+test_expect_failure 'store same ref twice' '
+ >foo &&
+ git add foo &&
+ STASH_ID=$(git stash create) &&
+ git stash store -m "original message" $STASH_ID &&
+ git stash store -m "custom message" $STASH_ID &&
+ echo "stash@{0}: custom message" >expect &&
+ git stash list -1 >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'store -m foo shows right message' '
>foo &&
git add foo &&
--
2.15.0.471.g17a719cfe.dirty
next reply other threads:[~2017-11-22 21:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 21:28 Phil Hord [this message]
2017-11-24 5:49 ` [PATCH v2 2/2] stash-store: add failing test for same-ref Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171122212802.7068-1-phil.hord@gmail.com \
--to=phil.hord@gmail.com \
--cc=dturner@twopensource.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).