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

Re: How to trim the fat on my log graphs

From
Jeff King <peff@peff.net>
Date
Apr 23, 2014, 20:44 UTC
Message-ID
<20140423204443.GA20379@sigill.intra.peff.net>
In-Reply-To
<CAHd499Cw8=FMctRA49MUi+vP2gvMyXH9WgcfCKK_MrKDEOfvjw@mail.gmail.com>
On Wed, Apr 23, 2014 at 02:59:26PM -0500, Robert Dailey wrote:
Show 11 quoted lines
> I referred back to the documentation for --decorate:
> 
> --decorate[=short|full|no]
> Print out the ref names of any commits that are shown. If short is
> specified, the ref name prefixesrefs/heads/, refs/tags/ and
> refs/remotes/ will not be printed. If full is specified, the full ref
> name (including prefix) will be printed. The default option is short.
> 
> since default is short, and its documented to exclude tag names, I
> would expect them to not be there. I also tried removing it to test
> but i saw no difference; tag names are still visible.

Are you reading that as "if short is specified, then refs whose names are prefixed with refs/heads, refs/tags, etc will be omitted entirely from decoration"?

The intent is "if short is specified, then a ref whose names has the prefix of refs/heads, refs/tags, etc, will have that prefix removed when showing it".

IOW, the options are:
  $ git log -1 --no-decorate | head -1
  commit 0bc85abb7aa9b24b093253018801a0fb43d01122
  $ git log -1 --decorate=short | head -1
  commit 0bc85abb7aa9b24b093253018801a0fb43d01122 (HEAD, tag: v1.9.2, origin/maint)
  $ git log -1 --decorate=full | head -1
  commit 0bc85abb7aa9b24b093253018801a0fb43d01122 (HEAD, tag: refs/tags/v1.9.2, refs/remotes/origin/maint)

If that's the confusion, feel free to suggest better wording for the documentation.

-Peff
Previous: Junio C HamanoNext: Felipe Contreras
Message 7 of 8 in “How to trim the fat on my log graphs”
  1. Robert DaileyApr 22, 2014
  2. Junio C HamanoApr 22, 2014
  3. Robert DaileyApr 23, 2014
  4. Junio C HamanoApr 23, 2014
  5. Robert DaileyApr 23, 2014
  6. Junio C HamanoApr 23, 2014
  7. Jeff KingApr 23, 2014
  8. Felipe ContrerasApr 23, 2014

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.