Re: [PATCH] Make "git checkout <branch> <path>" work when <path> is a directory.

Previous thread: Re: multi-project repos (was Re: Cleaning up git user-interface by linux on Friday, November 17, 2006 - 1:11 am. (3 messages)

Next thread: "git fmt-merge-msg" SIGSEGV by Linus Torvalds on Friday, November 17, 2006 - 2:57 am. (1 message)

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

To: Michael K. Edwards <medwards.linux@...>
Cc: <git@...>
Date: Friday, November 17, 2006 - 2:04 am

Thanks.

I think I sent out the same yesterday morning, though.

Message-ID: <7vbqn8msuw.fsf@assigned-by-dhcp.cox.net>

The difference is that the one tries to catch misspelled <path>.

-

To: Junio C Hamano <junkio@...>
Cc: <git@...>
Date: Friday, November 17, 2006 - 2:18 am

Ah. Missed that patch, which is indeed a superset of mine. Looks
like you committed it on branch "next"; is that a personal
experimental branch, or the integration branch against which patches
should be generated?

Cheers,
- Michael
-

Previous thread: Re: multi-project repos (was Re: Cleaning up git user-interface by linux on Friday, November 17, 2006 - 1:11 am. (3 messages)

Next thread: "git fmt-merge-msg" SIGSEGV by Linus Torvalds on Friday, November 17, 2006 - 2:57 am. (1 message)