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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Michael K. Edwards <medwards-linux@xxxxxxxxx>
---
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 unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]