git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-checkout: Support relative paths containing "..".
@ 2007-11-09  0:36 David Symonds
  2007-11-09  0:36 ` [PATCH] git-checkout: Test for relative path use David Symonds
  0 siblings, 1 reply; 15+ messages in thread
From: David Symonds @ 2007-11-09  0:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Johannes Schindelin, Andreas Ericsson, David Symonds

Signed-off-by: David Symonds <dsymonds@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-11-09 20:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-09  0:36 [PATCH] git-checkout: Support relative paths containing ".." David Symonds
2007-11-09  0:36 ` [PATCH] git-checkout: Test for relative path use David Symonds
2007-11-09  1:28   ` Junio C Hamano
2007-11-09  1:44     ` David Symonds
2007-11-09  1:54       ` Junio C Hamano
2007-11-09  1:57         ` David Symonds
2007-11-09 19:48     ` Robin Rosenberg
2007-11-09  7:13   ` Johannes Sixt
2007-11-09  7:24     ` David Symonds
2007-11-09  7:37       ` David Symonds
2007-11-09  8:04       ` Junio C Hamano
2007-11-09  8:14         ` David Symonds
2007-11-09  9:06           ` Junio C Hamano
2007-11-09  9:10             ` David Symonds
2007-11-09  9:12               ` David Symonds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).