Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-checkout: Support relative paths containing "..".
author
David Symonds
<dsymonds@gmail.com>
Fri, 9 Nov 2007 00:36:06 +0000
(11:36 +1100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 12 Nov 2007 01:00:07 +0000
(17:00 -0800)
Signed-off-by: David Symonds <dsymonds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-checkout.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
40e2524
)
diff --git
a/git-checkout.sh
b/git-checkout.sh
index 89939206732849e968fabaf9128597c87f18f5c7..616d1eb8f8647d69bca0decc181aff2657bfae73 100755
(executable)
--- a/
git-checkout.sh
+++ b/
git-checkout.sh
@@
-134,9
+134,9
@@
Did you intend to checkout '$@' which can not be resolved as commit?"
fi
# Make sure the request is about existing paths.
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
# Run a post-checkout hook -- the HEAD does not change so the
# current HEAD is passed in for both args