summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-04-01 16:23:43 -0700
committerJunio C Hamano <gitster@pobox.com>2011-04-01 16:23:43 -0700
commit2aa5b6b6c0b2a2791dc9953371f2dca030b01a4d (patch)
tree7d4aaf0b0b04a5efd39b34206e0ac448c31095e1 /git-stash.sh
parentbcf3d1fd9ccc04350d793c077d3c112fb26f43f0 (diff)
parent6eaf92f3d08180da4a6bd40035919a7e07ffed5a (diff)
downloadgit-2aa5b6b6c0b2a2791dc9953371f2dca030b01a4d.tar.gz
Merge branch 'pk/stash-apply-status-relative' into maint
* pk/stash-apply-status-relative: Add test: git stash shows status relative to current dir git stash: show status relative to current directory
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-stash.sh b/git-stash.sh
index 5130228909..a305fb19f1 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -12,6 +12,7 @@ USAGE="list [<options>]
SUBDIRECTORY_OK=Yes
OPTIONS_SPEC=
+START_DIR=`pwd`
. git-sh-setup
require_work_tree
cd_to_toplevel
@@ -393,7 +394,7 @@ apply_stash () {
then
squelch='>/dev/null 2>&1'
fi
- eval "git status $squelch" || :
+ (cd "$START_DIR" && eval "git status $squelch") || :
else
# Merge conflict; keep the exit status from merge-recursive
status=$?