[PATCH] show-ref: place angle brackets around variables in usage string

Subsystems: the rest

DORMANTno replies

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

[PATCH] show-ref: place angle brackets around variables in usage string

From: Alex Henrie <hidden>
Date: 2016-06-15 23:06:20

Signed-off-by: Alex Henrie <redacted>
---
 builtin/show-ref.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index dfbc314..131ef28 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -8,7 +8,7 @@
 
 static const char * const show_ref_usage[] = {
 	N_("git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference] [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<pattern>...]"),
-	N_("git show-ref --exclude-existing[=pattern] < ref-list"),
+	N_("git show-ref --exclude-existing[=<pattern>] < <ref-list>"),
 	NULL
 };
 
-- 
2.5.0

Re: [PATCH] show-ref: place angle brackets around variables in usage string

From: Philip Oakley <hidden>
Date: 2016-06-15 23:06:20

From: "Alex Henrie" <redacted>
quoted hunk
Signed-off-by: Alex Henrie <redacted>
---
builtin/show-ref.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index dfbc314..131ef28 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -8,7 +8,7 @@
static const char * const show_ref_usage[] = {
 N_("git show-ref [-q | --quiet] [--verify] [--head] [-d 
| --dereference] [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags] 
[--heads] [--] [<pattern>...]"),
- N_("git show-ref --exclude-existing[=pattern] < ref-list"),
+ N_("git show-ref --exclude-existing[=<pattern>] < <ref-list>"),
Should the '<' stdin redirection be shown?

It looks (at first glance) as if this gained a double '< <' at the 
beginning of 'ref-list', rather than being a clean indication of the 
redirection. Perhaps change 'ref-list' to 'ref-list-file' for a slight 
improvement in clarity - this it's only occurance, and the redirection 
would best match a file.

 NULL
};

-- 
2.5.0
--
Philip
(will be offline for 4 days) 

Re: [PATCH] show-ref: place angle brackets around variables in usage string

From: Alex Henrie <hidden>
Date: 2016-06-15 23:06:20

2015-08-29 4:21 GMT-06:00 Philip Oakley [off-list ref]:
Should the '<' stdin redirection be shown?

It looks (at first glance) as if this gained a double '< <' at the beginning
of 'ref-list', rather than being a clean indication of the redirection.
Perhaps change 'ref-list' to 'ref-list-file' for a slight improvement in
clarity - this it's only occurance, and the redirection would best match a
file.
This syntax occurs in three other places in Git:

git cat-file (--batch | --batch-check) [--follow-symlinks] < <list-of-objects>

git check-attr --stdin [-z] [-a | --all | <attr>...] < <list-of-paths>

git hash-object  --stdin-paths < <list-of-paths>

So if we need to say <ref-list-file> for clarity, we should also say
<object-list-file> and <path-list-file> for these other commands.

I think the most sane thing to do is to commit this patch as-is, and
then someone can submit a separate patch to reword all four usage
strings for increased clarity.

-Alex
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help