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

Re: 'git stash list' vs. non-default 'log.date' setting

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 9, 2010, 15:02 UTC
Message-ID
<7vbp9b96cm.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100809104056.GJ4612@neumann>
SZEDER Gábor <szeder@ira.uka.de> writes:
> Fortunately, fixing 2) is a no-brainer:

I don't think it is a "no-brainer" to "fix" it, even though it may be so to hack it around. Having to give "--date=default" to "git log -g" to cause it to show reflog entries in non-date format sounds like a terrible UI bug to me. I'd expect

    $ git log -g --date=default

to give you the logs in the default date format, overriding log.date, and perhaps either of these

    $ git log -g --no-date
    $ git log -g --date=no
    $ git log -g --numbered
to countermand log.date and force it to show numbered entries.

I _think_ "git log -g" uses a hacky heuristics to choose between date/number based on how you give the stating ref. I personally do not like this dwim very much, but it seems to be stable and established by now, so it may be a good thing to use here instead:

    $ git log -g refs/stash@{0}
    $ git log -g refs/stash@{now}
Previous: SZEDER GáborNext: SZEDER Gábor
Message 2 of 3 in “'git stash list' vs. non-default 'log.date' setting”
  1. SZEDER GáborAug 9, 2010
  2. Junio C HamanoAug 9, 2010
  3. SZEDER GáborAug 10, 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.