Skip to content

Commit

Permalink
git-checkout: Support relative paths containing "..".
Browse files Browse the repository at this point in the history
Signed-off-by: David Symonds <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
dsymonds authored and gitster committed Nov 12, 2007
1 parent 40e2524 commit 4307234
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git-checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4307234

Please sign in to comment.