Skip to contentSkip to conversation

ls-remote: add -t and -h options.

PATCH In review Miklos Vajna 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ls-remote: add -t and -h options.

These options are listed in the manpage (aliases for --tags/--heads) but they were not handled.

---

Alternatively, if it's too late to introduce new options, I think we should remove these options from the manpage, but I prefer the current fix.

 builtin-ls-remote.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
builtin-ls-remote.c +2 -2
index c2caeea..6dd31d1 100644
@@ -54,11 +54,11 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
 				uploadpack = arg + 7;
 				continue;
 			}
-			if (!strcmp("--tags", arg)) {
+			if (!strcmp("--tags", arg) || !strcmp("-t", arg)) {
 				flags |= REF_TAGS;
 				continue;
 			}
-			if (!strcmp("--heads", arg)) {
+			if (!strcmp("--heads", arg) || !strcmp("-h", arg)) {
 				flags |= REF_HEADS;
 				continue;
 			}
Signature · 1 line
1.5.4.rc3.4.g16335-dirty
#1 lore raw

Hi,

Quoted 9 lines · Miklos Vajna

These options are listed in the manpage (aliases for --tags/--heads) but they were not handled.

---

Alternatively, if it's too late to introduce new options, I think we should remove these options from the manpage, but I prefer the current fix.

It's not like you added functionality, but just short option handling. IMHO this is perfectly okay, even this late in the 1.5.4 cycle.

Ciao,
Dscho