summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5e1a2e8)
raw | patch | inline | side by side (parent: 5e1a2e8)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 17 Jan 2007 18:52:36 +0000 (10:52 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 17 Jan 2007 18:52:36 +0000 (10:52 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-add.txt | patch | blob | history | |
builtin-add.c | patch | blob | history |
index a5051aad6bfdf748976430452206e40838c75ca6..b73a99d61f57c7d532bbf8dc94bf2cb167d78058 100644 (file)
SYNOPSIS
--------
-'git-add' [-n] [-v] [-f] [--interactive] [--] <file>...
+'git-add' [-n] [-v] [-f] [--interactive | -i] [--] <file>...
DESCRIPTION
-----------
-f::
Allow adding otherwise ignored files.
-\--interactive::
+\i, \--interactive::
Add modified contents in the working tree interactively to
the index.
diff --git a/builtin-add.c b/builtin-add.c
index e7a1b4d9ab43cbb7de48b099c3afb721903f516b..87e16aa2200f90e2f12673e856040ed29ee7d119 100644 (file)
--- a/builtin-add.c
+++ b/builtin-add.c
#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)
{
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) {