Skip to content

Commit a47a645

Browse files
pcloudsgitster
authored andcommitted
checkout-index: remove obsolete comment
The first paragraph about flag order is no longer true and is mentioned in git-checkout-index.txt. The rest is also mentioned in git-checkout-index.txt. Remove it and keep uptodate document in one place. Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8499644 commit a47a645

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

builtin/checkout-index.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,6 @@
33
*
44
* Copyright (C) 2005 Linus Torvalds
55
*
6-
* Careful: order of argument flags does matter. For example,
7-
*
8-
* git checkout-index -a -f file.c
9-
*
10-
* Will first check out all files listed in the cache (but not
11-
* overwrite any old ones), and then force-checkout "file.c" a
12-
* second time (ie that one _will_ overwrite any old contents
13-
* with the same filename).
14-
*
15-
* Also, just doing "git checkout-index" does nothing. You probably
16-
* meant "git checkout-index -a". And if you want to force it, you
17-
* want "git checkout-index -f -a".
18-
*
19-
* Intuitiveness is not the goal here. Repeatability is. The
20-
* reason for the "no arguments means no work" thing is that
21-
* from scripts you are supposed to be able to do things like
22-
*
23-
* find . -name '*.h' -print0 | xargs -0 git checkout-index -f --
24-
*
25-
* or:
26-
*
27-
* find . -name '*.h' -print0 | git checkout-index -f -z --stdin
28-
*
29-
* which will force all existing *.h files to be replaced with
30-
* their cached copies. If an empty command line implied "all",
31-
* then this would force-refresh everything in the cache, which
32-
* was not the point.
33-
*
34-
* Oh, and the "--" is just a good idea when you know the rest
35-
* will be filenames. Just so that you wouldn't have a filename
36-
* of "-a" causing problems (not possible in the above example,
37-
* but get used to it in scripting!).
386
*/
397
#include "builtin.h"
408
#include "cache.h"

0 commit comments

Comments
 (0)