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

Re: Conflicting "-n" short options for git-pull?

From
FPFrans Pop <elendil@planet.nl>
Date
Sep 16, 2007, 11:17 UTC
Message-ID
<200709161317.12339.elendil@planet.nl>
In-Reply-To
<7vfy1f8pmm.fsf@gitster.siamese.dyndns.org>
On Sunday 16 September 2007, Junio C Hamano wrote:
Show 14 quoted lines
> Frans Pop <elendil@planet.nl> writes:
> > According to the man page for git-pull from git-core 1.5.3.1 (Debian
> > package), two options are defined as having the short option "-n":
> >
> >      -n, --no-summary
> >          Do not show diffstat at the end of the merge.
> > [...]
> >      -n, --no-tags
> >          By default, git-fetch fetches tags that point at objects that
> > are downloaded from the remote repository and stores them locally. This
> > option disables this automatic tag following.
>
> The manpage option descriptions are shared between the
> commands.  Maybe we should drop mention of the shorthand form.

Not sure if that last is the correct solution. Wouldn't it mean that short options would not be documented at all anymore?

> When git-fetch is used -n means --no-tags because there is no
> other -n; when git-pull indirectly invokes git-fetch, you need
> to spell it --no-tags because --no-summary takes precedence.

That does explain, but it is not at all obvious from the documentation. Guess this is a general "problem" in git then.

Another question. Is it possible to set default options for commands somehow? I'd like to run git-pull with '--no-summary' by default. I could of course define an alias, but that only covers 'git-pull' and not 'git pull'. Does git itself have some mechanism for this?

Thanks, Frans Pop

Previous: Junio C Hamano
Message 3 of 3 in “Conflicting "-n" short options for git-pull?”
  1. Frans PopSep 15, 2007
  2. Junio C HamanoSep 15, 2007
  3. Frans PopSep 16, 2007

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.