aboutsummaryrefslogtreecommitdiff
path: root/builtin-add.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-17 10:52:36 -0800
committerJunio C Hamano <junkio@cox.net>2007-01-17 10:52:36 -0800
commitdf59afe3eb121e89195e246105dd53de0ec396ab (patch)
tree7be27204d19a7c21b2c30efbcdb226f45fa383ca /builtin-add.c
parent5e1a2e8c61b31410fd0c2e5a67c45bf6b373f4c3 (diff)
downloadgit-df59afe3eb121e89195e246105dd53de0ec396ab.tar.gz
git-df59afe3eb121e89195e246105dd53de0ec396ab.tar.xz
Make a short-and-sweet "git-add -i" synonym for "git-add --interactive"
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-add.c')
-rw-r--r--builtin-add.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-add.c b/builtin-add.c
index e7a1b4d9a..87e16aa22 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -10,7 +10,7 @@
#include "cache-tree.h"
static const char builtin_add_usage[] =
-"git-add [-n] [-v] [-f] [--interactive] [--] <filepattern>...";
+"git-add [-n] [-v] [-f] [--interactive | -i] [--] <filepattern>...";
static void prune_directory(struct dir_struct *dir, const char **pathspec, int prefix)
{
@@ -102,7 +102,8 @@ int cmd_add(int argc, const char **argv, const char *prefix)
int add_interactive = 0;
for (i = 1; i < argc; i++) {
- if (!strcmp("--interactive", argv[i]))
+ if (!strcmp("--interactive", argv[i]) ||
+ !strcmp("-i", argv[i]))
add_interactive++;
}
if (add_interactive) {