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

Re: [PATCH] remote add: add a --no-tags (-n) option

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 19, 2010, 18:13 UTC
Message-ID
<7vvdbnqpis.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100419135014.1077.28627.stgit@localhost.localdomain>
Samuel Tardieu <sam@rfc1149.net> writes:
Show 6 quoted lines
> @@ -116,6 +116,8 @@ static int add(int argc, const char **argv)
>  
>  	struct option options[] = {
>  		OPT_BOOLEAN('f', "fetch", &fetch, "fetch the remote branches"),
> +		OPT_BOOLEAN('n', "no-tags", &notags,
> +			"do not import remote tags when fetching"),

Any long-opt that begins with "no-" looks wrong, especially that will allow people to say "--no-no-tags". Perhaps something like this is necessary.

    { OPTION_BOOLEAN, 0, "tags", &tags, NULL, "fetch tags", PARSE_OPT_NOARG }

Or imitate whatever we do in builtin-fetch.c; although I suspect the default would be different in this command and "git fetch", so you may need to adjust for the difference a bit.

Previous: Samuel TardieuNext: Samuel Tardieu
Message 4 of 7 in “remote add: add a --no-tags (-n) option”
  1. remote add: add a --no-tags (-n) optionSamuel Tardieu, Apr 19, 2010
  2. Michael J GruberApr 19, 2010
  3. Samuel TardieuApr 19, 2010
  4. Junio C HamanoApr 19, 2010
  5. Samuel TardieuApr 19, 2010
  6. Junio C HamanoApr 19, 2010
  7. Samuel TardieuApr 19, 2010

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.