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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Aug 17, 2011 at 19:22 UTC
a47a645e7057f28441f0f4b259db11171158553a
1 file changed
-32
builtin/checkout-index.c
-32
@@ -3,38 +3,6 @@
3
*
4
* Copyright (C) 2005 Linus Torvalds
5
*
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!).
6
*/
7
#include "builtin.h"
8
#include "cache.h"