From: "SZEDER Gábor" <szeder@ira.uka.de>
To: git@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Subject: recent 'unpack_trees()'-related changes break 'git stash'
Date: Sat, 15 Mar 2008 02:41:33 +0100 [thread overview]
Message-ID: <20080315014133.GB32265@neumann> (raw)
Hi,
t3903-stash.sh _sometimes_ fails at the 'drop middle stash' testcase.
After playing around with it this evening I was able to narrow it
down, and turned out that it has nothing to do with 'git stash drop',
but something is broken behind 'stash'.
Unfortunately, I can't reproduce the bug reliably. Here is a
testcase, that sometimes fails:
test_description='Test git-stash'
. ./test-lib.sh
test_expect_success 'try to catch some rare occurring stash bug' '
echo 1 > file &&
git add file &&
test_tick &&
git commit -m initial &&
echo 2 > file &&
test_tick &&
git stash &&
test 2 = $(git stash show stash@{0} | wc -l) &&
echo "after first show test"
echo 3 > file &&
git stash &&
test 2 = $(git stash show stash@{0} | wc -l) &&
echo "after second show test"
'
test_done
and here is a loop to run the above testcase until it fails (take
care, it deletes ./trash at the beginning!):
ret=0
i=0
while test $ret = 0 ; do
rm -rf ./trash
./mystashtest.sh --verbose
ret=$?
i=$((++i))
done
echo "test failed at ${i}. run"
Both should go into t/ directory.
The testcase usually fails during the first 25 run, but sometimes it
runs more than 100 times before failing. The test fails because the
second 'git stash' sometimes does something wrong: there is no
difference between stash@{0} and the clean working tree. There is no
error message from 'git stash' upon failure. During all the test runs
I never saw a failure occuring at the first 'git stash'.
I ran bisect using these scripts, and it turned out that the bug was
introduced by 34110cd4 (Make 'unpack_trees()' have a separate source
and destination index, 2008-03-06).
I have tried whether it has already been fixed in next or pu, but
those branches are affected, too.
Best,
Gábor
next reply other threads:[~2008-03-15 1:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-15 1:41 SZEDER Gábor [this message]
2008-03-15 4:20 ` Fix recent 'unpack_trees()'-related changes breaking 'git stash' Linus Torvalds
2008-03-15 4:40 ` Linus Torvalds
2008-03-15 11:31 ` Szeder Gábor
2008-03-15 4:54 ` Junio C Hamano
2008-03-15 11:36 ` Szeder Gábor
2008-03-15 16:51 ` Linus Torvalds
2008-03-30 21:14 ` [PATCH] git-stash: use git-read-tree --index-output option しらいしななこ
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080315014133.GB32265@neumann \
--to=szeder@ira.uka.de \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.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.
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 NNTP newsgroup(s).