git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Make "git checkout <branch> <path>" work when <path> is a directory.
@ 2006-11-17  5:49 Michael K. Edwards
  2006-11-17  6:04 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Michael K. Edwards @ 2006-11-17  5:49 UTC (permalink / raw)
  To: git

This improves the workflow for, say, kernel subsystem backporting.

Signed-off-by: Michael K. Edwards <medwards-linux@gmail.com>
---
 git-checkout.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-checkout.sh b/git-checkout.sh
index dd47724..5866604 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -106,7 +106,8 @@ Did you intend to checkout '$@' which ca
 		git-ls-tree --full-name -r "$new" "$@" |
 		git-update-index --index-info || exit $?
 	fi
-	git-checkout-index -f -u -- "$@"
+	git-ls-files "$@" |
+	git-checkout-index -f -u --stdin
 	exit $?
 else
 	# Make sure we did not fall back on $arg^{tree} codepath
-- 

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

end of thread, other threads:[~2006-11-17  8:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-17  5:49 [PATCH] Make "git checkout <branch> <path>" work when <path> is a directory Michael K. Edwards
2006-11-17  6:04 ` Junio C Hamano
2006-11-17  6:18   ` Michael K. Edwards
2006-11-17  8:15     ` Junio C Hamano

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).