Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-19 03:04:17 +0300
committerJunio C Hamano <gitster@pobox.com>2007-11-19 03:04:17 +0300
commitd577bc58a3424f4d0d7f7c8094753b92cb7cb823 (patch)
tree35902569e856a884a6bb2c31a26de5fdbc5713a0 /git-checkout.sh
parentffa06873d62bba358b51b43def2a0b3aefc790bf (diff)
parentfed1b5cac0cc3ae324dc004181a276ea16589951 (diff)
Merge branch 'ds/checkout-upper'
* ds/checkout-upper: git-checkout: Test for relative path use. git-checkout: Support relative paths containing "..".
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-xgit-checkout.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index c00cedd483..aa724ac1a3 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -133,9 +133,9 @@ Did you intend to checkout '$@' which can not be resolved as commit?"
fi
# Make sure the request is about existing paths.
- git ls-files --error-unmatch -- "$@" >/dev/null || exit
- git ls-files -- "$@" |
- git checkout-index -f -u --stdin
+ git ls-files --full-name --error-unmatch -- "$@" >/dev/null || exit
+ git ls-files --full-name -- "$@" |
+ (cd_to_toplevel && git checkout-index -f -u --stdin)
# Run a post-checkout hook -- the HEAD does not change so the
# current HEAD is passed in for both args