{"thread":{"id":"27003","subject":"[PATCH] stash: fix false positive in the invalid ref test.","startedAt":"2011-04-05T23:21:13Z","lastAt":"2011-04-06T23:04:59Z","messageCount":4,"participants":["Jon Seymour","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"165235","messageId":"1302045673-59982-1-git-send-email-jon.seymour@gmail.com","threadId":"27003","inReplyTo":null,"subject":"[PATCH] stash: fix false positive in the invalid ref test.","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2011-04-05T23:21:13Z","receivedAt":"2011-04-05T23:21:13Z","isPatch":true,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"Jeff King reported a problem with git stash apply incorrectly\napplying an invalid stash reference.\n\nThere is an existing test that should have caught this, but\nthe test itself was broken, resulting in a false positive.\n\nSigned-off-by: Jon Seymour <jon.seymour@gmail.com>\n---\n t/t3903-stash.sh |   10 +++++-----\n 1 files changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t3903-stash.sh b/t/t3903-stash.sh\nindex 11077f0..5263de7 100755\n--- a/t/t3903-stash.sh\n+++ b/t/t3903-stash.sh\n@@ -543,11 +543,11 @@ test_expect_success 'invalid ref of the form stash@{n}, n >= N' '\n \techo bar6 > file2 &&\n \tgit add file2 &&\n \tgit stash &&\n-\ttest_must_fail git drop stash@{1} &&\n-\ttest_must_fail git pop stash@{1} &&\n-\ttest_must_fail git apply stash@{1} &&\n-\ttest_must_fail git show stash@{1} &&\n-\ttest_must_fail git branch tmp stash@{1} &&\n+\ttest_must_fail git stash drop stash@{1} &&\n+\ttest_must_fail git stash pop stash@{1} &&\n+\ttest_must_fail git stash apply stash@{1} &&\n+\ttest_must_fail git stash show stash@{1} &&\n+\ttest_must_fail git stash branch tmp stash@{1} &&\n \tgit stash drop\n '\n \n-- \n1.7.5.rc0.132.g4c19c\n"},{"id":"165296","messageId":"20110406182726.GC8205@sigill.intra.peff.net","threadId":"27003","inReplyTo":"1302045673-59982-1-git-send-email-jon.seymour@gmail.com","subject":"Re: [PATCH] stash: fix false positive in the invalid ref test.","fromName":"Jeff King","fromEmail":"peff@github.com","sentAt":"2011-04-06T18:27:26Z","receivedAt":"2011-04-06T18:27:26Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Apr 06, 2011 at 09:21:13AM +1000, Jon Seymour wrote:\n\n> diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh\n> index 11077f0..5263de7 100755\n> --- a/t/t3903-stash.sh\n> +++ b/t/t3903-stash.sh\n> @@ -543,11 +543,11 @@ test_expect_success 'invalid ref of the form stash@{n}, n >= N' '\n>  \techo bar6 > file2 &&\n>  \tgit add file2 &&\n>  \tgit stash &&\n> -\ttest_must_fail git drop stash@{1} &&\n> -\ttest_must_fail git pop stash@{1} &&\n> -\ttest_must_fail git apply stash@{1} &&\n> -\ttest_must_fail git show stash@{1} &&\n> -\ttest_must_fail git branch tmp stash@{1} &&\n> +\ttest_must_fail git stash drop stash@{1} &&\n> +\ttest_must_fail git stash pop stash@{1} &&\n> +\ttest_must_fail git stash apply stash@{1} &&\n> +\ttest_must_fail git stash show stash@{1} &&\n> +\ttest_must_fail git stash branch tmp stash@{1} &&\n>  \tgit stash drop\n\nProbably we should just squash your fix in with my first patch, and drop\nmy test.  Your fixed version is a superset of what mine tests.\n\n-Peff\n"},{"id":"165320","messageId":"BANLkTimqG4XSTRGH-+EMi6vYL7N8JU1Mtw@mail.gmail.com","threadId":"27003","inReplyTo":"20110406182726.GC8205@sigill.intra.peff.net","subject":"Re: [PATCH] stash: fix false positive in the invalid ref test.","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2011-04-06T22:47:07Z","receivedAt":"2011-04-06T22:47:07Z","isPatch":true,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"On Thu, Apr 7, 2011 at 4:27 AM, Jeff King <peff@github.com> wrote:\n> On Wed, Apr 06, 2011 at 09:21:13AM +1000, Jon Seymour wrote:\n    git stash drop\n>\n> Probably we should just squash your fix in with my first patch, and drop\n> my test.  Your fixed version is a superset of what mine tests.\n>\n\nI was wondering if it might be better to break up the original test,\nso that each sub-function has its own invalid ref test? If there is\nagreement, I can do this on top of 9355fc which is the tip of the\nbranch containing these fixes that has been merged into pu.\n\njon.\n"},{"id":"165322","messageId":"20110406230459.GC20904@sigill.intra.peff.net","threadId":"27003","inReplyTo":"BANLkTimqG4XSTRGH-+EMi6vYL7N8JU1Mtw@mail.gmail.com","subject":"Re: [PATCH] stash: fix false positive in the invalid ref test.","fromName":"Jeff King","fromEmail":"peff@github.com","sentAt":"2011-04-06T23:04:59Z","receivedAt":"2011-04-06T23:04:59Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Apr 07, 2011 at 08:47:07AM +1000, Jon Seymour wrote:\n\n> On Thu, Apr 7, 2011 at 4:27 AM, Jeff King <peff@github.com> wrote:\n> > On Wed, Apr 06, 2011 at 09:21:13AM +1000, Jon Seymour wrote:\n>     git stash drop\n> >\n> > Probably we should just squash your fix in with my first patch, and drop\n> > my test.  Your fixed version is a superset of what mine tests.\n> >\n> \n> I was wondering if it might be better to break up the original test,\n> so that each sub-function has its own invalid ref test? If there is\n> agreement, I can do this on top of 9355fc which is the tip of the\n> branch containing these fixes that has been merged into pu.\n\nI don't think it's that big a deal. You could do a more thorough test\nfor each, I guess (to make sure they not just failed but also show that\nthey didn't have any effects), but that would not be checking an actual\nregression we have seen. IOW, I'm sure you have something more\nproductive to do with your time. :)\n\n-Peff\n"}]}