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 коммит произвёл Junio C Hamano
Родитель 40e2524da9
Коммит 4307234a4e
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

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