aboutsummaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-07-25 15:32:22 -0700
committerJunio C Hamano <gitster@pobox.com>2007-07-25 15:34:52 -0700
commitceff079bdcaebb67b0379a1036a32b4dfebb6012 (patch)
tree670da24ef878391367b2d350a20f9ab42593eb5d /git-stash.sh
parent4eb994733d75d40cab87e7b4736166cf33e7787a (diff)
downloadgit-ceff079bdcaebb67b0379a1036a32b4dfebb6012.tar.gz
git-ceff079bdcaebb67b0379a1036a32b4dfebb6012.tar.xz
Make sure git-stash works from subdirectory.
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>
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-stash.sh b/git-stash.sh
index de13dd181..d9cd42d4b 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -6,6 +6,7 @@ USAGE='[ | list | show | apply | clear]'
SUBDIRECTORY_OK=Yes
. git-sh-setup
require_work_tree
+cd_to_toplevel
TMP="$GIT_DIR/.git-stash.$$"
trap 'rm -f "$TMP-*"' 0