Skip to content

Commit fd25c82

Browse files
author
Junio C Hamano
committed
git-checkout-index: documentation updates.
Now the behaviour of '-a' has been straightened out, document it. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent a65a686 commit fd25c82

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

Documentation/git-checkout-index.txt

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ OPTIONS
3030
forces overwrite of existing files
3131

3232
-a::
33-
checks out all files in the cache (will then continue to
34-
process listed files).
33+
checks out all files in the cache. Cannot be used
34+
together with explicit filenames.
3535

3636
-n::
3737
Don't checkout new files, only refresh files already checked
@@ -44,15 +44,9 @@ OPTIONS
4444
--::
4545
Do not interpret any more arguments as options.
4646

47-
Note that the order of the flags matters:
47+
The order of the flags used to matter, but not anymore.
4848

49-
git-checkout-index -a -f file.c
50-
51-
will first check out all files listed in the cache (but not overwrite
52-
any old ones), and then force-checkout `file.c` a second time (ie that
53-
one *will* overwrite any old contents with the same filename).
54-
55-
Also, just doing "git-checkout-index" does nothing. You probably meant
49+
Just doing "git-checkout-index" does nothing. You probably meant
5650
"git-checkout-index -a". And if you want to force it, you want
5751
"git-checkout-index -f -a".
5852

@@ -78,12 +72,12 @@ scripting!).
7872
The prefix ability basically makes it trivial to use
7973
git-checkout-index as an "export as tree" function. Just read the
8074
desired tree into the index, and do a
81-
75+
8276
git-checkout-index --prefix=git-export-dir/ -a
83-
77+
8478
and git-checkout-index will "export" the cache into the specified
8579
directory.
86-
80+
8781
NOTE The final "/" is important. The exported name is literally just
8882
prefixed with the specified string, so you can also do something like
8983

0 commit comments

Comments
 (0)