summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d43367a)
raw | patch | inline | side by side (parent: d43367a)
author | Petr Baudis <pasky@suse.cz> | |
Tue, 25 Oct 2005 15:26:25 +0000 (17:26 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 26 Oct 2005 05:51:18 +0000 (22:51 -0700) |
This patch adds usage string to git-update-index, can be printed by the -h
or --help parameter.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
or --help parameter.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
update-index.c | patch | blob | history |
diff --git a/update-index.c b/update-index.c
index a84836be4a0cd32a61d4ae35c8ce3b0108ad5a34..661b86a979e7c75ea9b3ca9d030aebb44693ee04 100644 (file)
--- a/update-index.c
+++ b/update-index.c
}
}
+static const char update_index_usage[] =
+"git-update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--cacheinfo] [--chmod=(+|-)x] [--info-only] [--force-remove] [--stdin] [--index-info] [--ignore-missing] [-z] [--version] [--] <file>...";
+
int main(int argc, const char **argv)
{
int i, newfd, entries, has_errors = 0, line_termination = '\n';
verbose = 1;
continue;
}
+ if (!strcmp(path, "-h") || !strcmp(path, "--help"))
+ usage(update_index_usage);
die("unknown option %s", path);
}
update_one(path, prefix, prefix_length);