* [PATCH v2 2/2] stash-store: add failing test for same-ref
@ 2017-11-22 21:28 Phil Hord
2017-11-24 5:49 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Phil Hord @ 2017-11-22 21:28 UTC (permalink / raw)
To: Git; +Cc: David Turner, Phil Hord
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 2/2] stash-store: add failing test for same-ref
2017-11-22 21:28 [PATCH v2 2/2] stash-store: add failing test for same-ref Phil Hord
@ 2017-11-24 5:49 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2017-11-24 5:49 UTC (permalink / raw)
To: Phil Hord; +Cc: Git, David Turner
Phil Hord <phil.hord@gmail.com> writes:
> 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>
> ---
Sorry, I lost track. Where is v1 of this series and 1/2 of v2?
IOW, where does this patch fit in in the larger picture?
> 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 &&
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-24 5:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 21:28 [PATCH v2 2/2] stash-store: add failing test for same-ref Phil Hord
2017-11-24 5:49 ` Junio C Hamano
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).