Thread (1 message) 1 message, 1 author, 2016-06-15

Re: git-checkout-index, flag ordering and --prefix kludgy handling

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:09
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Possibly related (same subject, not in this thread)

Blaisorblade [off-list ref] writes:
I already knew that git-checkout-cache -a -f is wrong. But I
didn't know that

git-checkout-index -a --prefix=/home/paolo/Uml/space.mnt/paolo/Linux-2.6.git/

is.
At least, this should be documented in the man page;...

How about a bit further clarification on top of what is there,
like this?

 ------------
[PATCH] clarify that '-a' is really special in checkout-index.

Signed-off-by: Junio C Hamano <redacted>
---
diff --git a/Documentation/git-checkout-index.txt b/Documentation/git-checkout-index.txt
index 1ba6fb2..838059f 100644
--- a/Documentation/git-checkout-index.txt
+++ b/Documentation/git-checkout-index.txt
@@ -44,13 +44,15 @@ OPTIONS
 --::
 	Do not interpret any more arguments as options.
 
-Note that the order of the flags matters:
+Note that the order of the flags matters for `-a` flag:
 
      git-checkout-index -a -f file.c
 
 will first check out all files listed in the cache (but not overwrite
 any old ones), and then force-checkout `file.c` a second time (ie that
 one *will* overwrite any old contents with the same filename).
+In other words, `-a` means "operate as if names of all files were
+given here, with the flags given up to this point."
 
 Also, just doing "git-checkout-index" does nothing. You probably meant
 "git-checkout-index -a". And if you want to force it, you want
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help