Re: git-checkout-index, flag ordering and --prefix kludgy handling
From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:09
On Mon, 17 Oct 2005, Junio C Hamano wrote:
The patch looks good. Thanks.
Btw, I'd really like a "git checkout" that can do the per-file thing,
instead of always using the equivalent of git-checkout-index with "-a".
It's actually one of the few places where I still use the raw git
commands, doing things like
git-checkout-index -u -f filename
and I suspect that a lot of people would prefer that
git checkout filename
would just do that. Instead, we error out ("no such branch"). Which
isn't even what I want, and almost certainly not what most CVS users want
(they're used to checking out individual files).
Of course, in the generic case, that would require git-read-tree to take a
list of filenames (which would act as a "mask" for any activity against
the old index if one was loaded), but that's a pretty big thing. Even if
it's admittedly also potentially very useful too..
But even just a total special case (giving a filename would force the
checkout, no read-tree, no nothing, just force the old index contents)
might be acceptable and would only require some script hackery.
Linus