Re: [PATCH] Documentation: update-index: -z applies also to --index-info

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Documentation: update-index: -z applies also to --index-info

From: Štěpán Němec <hidden>
Date: 2016-06-15 22:49:43

Bert Wesarg [off-list ref] writes:
quoted hunk
Also mention, that --stdin and --index-info needs to be the last
option supplied and indicate this in the usage string.

Signed-off-by: Bert Wesarg <redacted>
---
 Documentation/git-update-index.txt |   13 +++++++------
 builtin/update-index.c             |    2 +-
 2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Documentation/git-update-index.txt
b/Documentation/git-update-index.txt
index 74d1d49..022c0fc 100644 Documentation/git-update-index.txt
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -18,10 +18,10 @@ SYNOPSIS
 	     [--skip-worktree | --no-skip-worktree]
 	     [--ignore-submodules]
 	     [--really-refresh] [--unresolve] [--again | -g]
-	     [--info-only] [--index-info]
-	     [-z] [--stdin]
+	     [--info-only]
 	     [--verbose]
-	     [--] [<file>]*
+	     [[-z] --stdin | --index-info]
+	     [--] [<file>]
If you want to remove the asterisk after all, then please make it
`<file>...', not `[<file>]'.

Štěpán

Re: [PATCH] Documentation: update-index: -z applies also to --index-info

From: Bert Wesarg <hidden>
Date: 2016-06-15 22:49:43

On Thu, Oct 7, 2010 at 21:36, Štěpán Němec [off-list ref] wrote:
Bert Wesarg [off-list ref] writes:
quoted
Also mention, that --stdin and --index-info needs to be the last
option supplied and indicate this in the usage string.

Signed-off-by: Bert Wesarg <redacted>
---
 Documentation/git-update-index.txt |   13 +++++++------
 builtin/update-index.c             |    2 +-
 2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Documentation/git-update-index.txt
b/Documentation/git-update-index.txt
index 74d1d49..022c0fc 100644 Documentation/git-update-index.txt
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -18,10 +18,10 @@ SYNOPSIS
           [--skip-worktree | --no-skip-worktree]
           [--ignore-submodules]
           [--really-refresh] [--unresolve] [--again | -g]
-          [--info-only] [--index-info]
-          [-z] [--stdin]
+          [--info-only]
           [--verbose]
-          [--] [<file>]*
+          [[-z] --stdin | --index-info]
+          [--] [<file>]
If you want to remove the asterisk after all, then please make it
`<file>...', not `[<file>]'.
Sorry. That was only by accident. Updated patch will follow.

Bert
Štěpán

[PATCH] Documentation: update-index: -z applies also to --index-info

From: Bert Wesarg <hidden>
Date: 2016-06-15 22:49:43

Also mention, that --stdin and --index-info needs to be the last
option supplied and indicate this in the usage string.

Signed-off-by: Bert Wesarg <redacted>
---
 Documentation/git-update-index.txt |   11 ++++++-----
 builtin/update-index.c             |    2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 74d1d49..0999950 100644 Documentation/git-update-index.txt
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -18,9 +18,9 @@ SYNOPSIS
 	     [--skip-worktree | --no-skip-worktree]
 	     [--ignore-submodules]
 	     [--really-refresh] [--unresolve] [--again | -g]
-	     [--info-only] [--index-info]
-	     [-z] [--stdin]
+	     [--info-only]
 	     [--verbose]
+	     [[-z] --stdin | --index-info]
 	     [--] [<file>]*
 
 DESCRIPTION
@@ -72,7 +72,7 @@ OPTIONS
 	Directly insert the specified info into the index.
 
 --index-info::
-        Read index information from stdin.
+        Read index information from stdin. (Must be the last option.)
 
 --chmod=(+|-)x::
         Set the execute permissions on the updated files.
@@ -139,13 +139,14 @@ you will need to handle the situation manually.
 	Instead of taking list of paths from the command line,
 	read list of paths from the standard input.  Paths are
 	separated by LF (i.e. one path per line) by default.
+	(Must be the last option.)
 
 --verbose::
         Report what is being added and removed from index.
 
 -z::
-	Only meaningful with `--stdin`; paths are separated with
-	NUL character instead of LF.
+	Only meaningful with `--stdin` or `--index-info`; paths are
+	separated with NUL character instead of LF.
 
 \--::
 	Do not interpret any more arguments as options.
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 3ab214d..2c1a81e 100644 builtin/update-index.c
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -398,7 +398,7 @@ static void read_index_info(int line_termination)
 }
 
 static const char update_index_usage[] =
-"git update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--skip-worktree|--no-skip-worktree] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again | -g] [--ignore-missing] [-z] [--verbose] [--] <file>...";
+"git update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--skip-worktree|--no-skip-worktree] [--info-only] [--force-remove] [--unresolve] [--again | -g] [--ignore-missing] [--verbose] [[-z] --stdin | --index-info] [--] <file>...";
 
 static unsigned char head_sha1[20];
 static unsigned char merge_head_sha1[20];
-- 
1.7.1.1067.g5aeb7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help