Signed-off-by: David Symonds <dsymonds@xxxxxxxxx> --- git-checkout.sh | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git-checkout.sh b/git-checkout.sh index c00cedd..aa724ac 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 -- 1.5.3.1 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html