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

Re: rev-list pretty format behavior

From
Oliver Runge <oliver.runge@gmail.com>
Date
Apr 8, 2015, 17:12 UTC
Message-ID
<CAHaCNWKYY_5JvuAk76wnrTTBaBQM2Fv8hz37tEYC5Jzm1tY-RQ@mail.gmail.com>
In-Reply-To
<5523E175.2060607@drmicha.warpmail.net>
Heyup, Dr. Gruber.
On 7 April 2015 at 15:53, Michael J Gruber <git@drmicha.warpmail.net> wrote:
Show 14 quoted lines
> I'm wondering what the difference is - or should be - between "git log"
> and "git rev-list" with (completely) user specified output. That
> question goes both ways:
>
> - Why do we need "rev-list" to have completely flexible output when we
> have "log" with such flexibility?
>
> - Why do we even have pretty formats for "rev-list"?
>
> I'm thinking of rev-list as a raw (plumbing) revision lister much like
> cat-file is the inspection tool for the objects, and log as the human
> facing output with appropriate defaults (resp. show).
>
> Note that "rev-list -v" isn't even documented afaics.

I can't answer your questions, because I don't have a very deep understanding of either command, but according to the "log" docu, formating really belongs to "rev-list" and "log" only adds the diff-* features: ------------------------------------------ The command takes options applicable to the git rev-list command to control what is shown and how, and options applicable to the git diff-* commands to control how the changes each commit introduces are shown. ------------------------------------------

I also feel that perhaps "pretty" is a bit of a misnomer and naturally is associated with "human readable", but the formating is vital for any raw output that scripts can process.

Oliver
Previous: Michael J Gruber
Message 5 of 5 in “rev-list pretty format behavior”
  1. Oliver RungeApr 4, 2015
  2. Junio C HamanoApr 5, 2015
  3. Oliver RungeApr 6, 2015
  4. Michael J GruberApr 7, 2015
  5. Oliver RungeApr 8, 2015

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.