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

Re: [PATCH 1/3] log: Show reflog date with --date=normal

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 28, 2009, 17:05 UTC
Message-ID
<7vr5w07n6p.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1e2f7d731286d99b74cc9af37beb5fe187e9d460.1248770042.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
> The reflog case special-cases --date=default (internally DATE_NORMAL)
> to show the entry number instead of a date.  This means it is
> impossible to show the default date format for the reflog entries.
Isn't it the other way around?  Traditionally you wrote
    $ git show -g @{0}
    $ git show -g @{now}

to explicitly ask for either time or number, but without @{which}, the presense of --date=<foo> for some unknown reason declares that you want time for reflogs, too. I personally think that is an insane behaviour, but that is probably already stuck in people's fingers.

    $ git show -g --date=short master
    $ git show -g --date=short master@{0}
    $ git show -g --date=short master@{now}
    
I think what is broken, if anything, is the second case (i.e. with --date,
you cannot even ask for entry numbers).
You can get times in default date formats just fine.
Previous: Johannes Schindelin
Message 10 of 10 in “log: Show reflog date with --date=normal”
  1. 1/3 log: Show reflog date with --date=normalThomas Rast, Jul 28, 2009
  2. 2/3 log: --date and --no-date to toggle reflog datesThomas Rast, Jul 28, 2009
  3. 3/3 bash completion: log --date, --no-date and --date=normalThomas Rast, Jul 28, 2009
  4. Johannes SchindelinJul 28, 2009
  5. Johannes SchindelinJul 28, 2009
  6. Thomas RastJul 28, 2009
  7. Johannes SchindelinJul 28, 2009
  8. Thomas RastJul 28, 2009
  9. Johannes SchindelinJul 28, 2009
  10. Junio C HamanoJul 28, 2009

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.