1
0
mirror of https://github.com/git/git.git synced 2024-09-24 09:01:47 +02:00

git-checkout: Support relative paths containing "..".

Signed-off-by: David Symonds <dsymonds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
David Symonds 2007-11-09 11:36:06 +11:00 committed by Junio C Hamano
parent 40e2524da9
commit 4307234a4e

View File

@ -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.
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