git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] ls-remote: add -t and -h options.

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Jan 15, 2008, 20:34 UTC
Message-ID
<20080115203454.GU29972@genesis.frugalware.org>

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

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---

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(-)
diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c
index c2caeea..6dd31d1 100644
--- a/builtin-ls-remote.c
+++ b/builtin-ls-remote.c
@@ -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;
 			}
-- 
1.5.4.rc3.4.g16335-dirty
Next: Johannes Schindelin
Message 1 of 2 in “ls-remote: add -t and -h options.”
  1. ls-remote: add -t and -h options.Miklos Vajna, Jan 15, 2008
  2. Johannes SchindelinJan 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.