git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael K. Edwards" <medwards.linux@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] Make "git checkout <branch> <path>" work when <path> is a directory.
Date: Thu, 16 Nov 2006 21:49:21 -0800	[thread overview]
Message-ID: <f2b55d220611162149m719079f3ubdaeac43fe9798cb@mail.gmail.com> (raw)

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

             reply	other threads:[~2006-11-17  5:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-17  5:49 Michael K. Edwards [this message]
2006-11-17  6:04 ` [PATCH] Make "git checkout <branch> <path>" work when <path> is a directory Junio C Hamano
2006-11-17  6:18   ` Michael K. Edwards
2006-11-17  8:15     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2b55d220611162149m719079f3ubdaeac43fe9798cb@mail.gmail.com \
    --to=medwards.linux@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).