summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4eb9947)
raw | patch | inline | side by side (parent: 4eb9947)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 Jul 2007 22:32:22 +0000 (15:32 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 Jul 2007 22:34:52 +0000 (15:34 -0700) |
We say "SUBDIRECTORY_OK" but we did not chdir to toplevel; this
is fine as long as everything we use can be started from a
subdirectory, but unfortunately "merge-recursive" is not one of
the programs you can safely use from a subdirectory.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
is fine as long as everything we use can be started from a
subdirectory, but unfortunately "merge-recursive" is not one of
the programs you can safely use from a subdirectory.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh | patch | blob | history | |
t/t3903-stash.sh | patch | blob | history |
diff --git a/git-stash.sh b/git-stash.sh
index de13dd1812170ca76eb5706aefb7f59d22be6d48..d9cd42d4b34d7ea938131deba305ae9ef636ec7b 100755 (executable)
--- a/git-stash.sh
+++ b/git-stash.sh
SUBDIRECTORY_OK=Yes
. git-sh-setup
require_work_tree
+cd_to_toplevel
TMP="$GIT_DIR/.git-stash.$$"
trap 'rm -f "$TMP-*"' 0
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 392ac1c5c5ff9edfe9bd96abb302376387f42ce8..9a9a250d2c6bad80745b7ebd2df7ac947d30b521 100755 (executable)
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
test 1 = $(git show HEAD:file)
'
+test_expect_success 'unstashing in a subdirectory' '
+ git reset --hard HEAD &&
+ mkdir subdir &&
+ cd subdir &&
+ git stash apply
+'
+
test_done