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 fi
# Make sure the request is about existing paths. # Make sure the request is about existing paths.
git ls-files --error-unmatch -- "$@" >/dev/null || exit git ls-files --full-name --error-unmatch -- "$@" >/dev/null || exit
git ls-files -- "$@" | git ls-files --full-name -- "$@" |
git checkout-index -f -u --stdin (cd_to_toplevel && git checkout-index -f -u --stdin)
# Run a post-checkout hook -- the HEAD does not change so the # Run a post-checkout hook -- the HEAD does not change so the
# current HEAD is passed in for both args # current HEAD is passed in for both args