@matheusbsbs / matheus-bagliano / commits / 7099c9c7c9
Fork 0

update-index -g

I often find myself typing this but the common abbreviation "g" for "again" has not been supported so far for some unknown reason. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Aug 23, 2006 at 21:24 UTC 7099c9c7c9c14ca3f66b8a04219162e6f259ff37
2 files changed +4 -4
Documentation/git-update-index.txt
+2 -2
@@ -15,7 +15,7 @@ SYNOPSIS
15 [--cacheinfo <mode> <object> <file>]\*
16 [--chmod=(+|-)x]
17 [--assume-unchanged | --no-assume-unchanged]
18 - [--really-refresh] [--unresolve] [--again]
18 + [--really-refresh] [--unresolve] [--again | -g]
19 [--info-only] [--index-info]
20 [-z] [--stdin]
21 [--verbose]
@@ -80,7 +80,7 @@ OPTIONS
80 filesystem that has very slow lstat(2) system call
81 (e.g. cifs).
82
83 ---again::
83 +--again, -g::
84 Runs `git-update-index` itself on the paths whose index
85 entries are different from those from the `HEAD` commit.
86
builtin-update-index.c
+2 -2
@@ -306,7 +306,7 @@ static void read_index_info(int line_termination)
306 }
307
308 static const char update_index_usage[] =
309 -"git-update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again] [--ignore-missing] [-z] [--verbose] [--] <file>...";
309 +"git-update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again | -g] [--ignore-missing] [-z] [--verbose] [--] <file>...";
310
311 static unsigned char head_sha1[20];
312 static unsigned char merge_head_sha1[20];
@@ -595,7 +595,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
595 active_cache_changed = 0;
596 goto finish;
597 }
598 - if (!strcmp(path, "--again")) {
598 + if (!strcmp(path, "--again") || !strcmp(path, "-g")) {
599 has_errors = do_reupdate(argc - i, argv + i,
600 prefix, prefix_length);
601 if (has_errors)