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

Re: git rev-list formatting

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Mar 22, 2010, 13:08 UTC
Message-ID
<4BA76BDF.6060106@drmicha.warpmail.net>
In-Reply-To
<m3eijcpoud.fsf@winooski.ccs.neu.edu>
Eli Barzilay venit, vidit, dixit 22.03.2010 12:39:
Show 14 quoted lines
> Eli Barzilay <eli@barzilay.org> writes:
> 
>> [...]
>>
>> Also, is there a way to avoid the "commit <sha1>" line, print some
>> information that I specify in the format string, and show the whole
>> message as is (without wrapping or other tweaks)?
> 
> Looks like `git log' does something similar to what I want anyway,
> which leads me to a related question -- it's not clear to me what are
> the differences between `git rev-list', `git log', `git diff', and
> `git show', since it looks like they can all be tweaked to produce
> similar outputs.  Are they all the same with different outputs?  Is
> there some description of them with the differences explained?

The rev-list man page lists all commands of that family, with rev-list being the bare bones version, and log and friends being more "high level". log and rev-list walk the revision tree, show does not. Most of that can be changed through options. whatchanged is a special family member...

diff is from a completely different family (see git help diff or git help diffcore). It never walks, but compares revisions (or other things).

The log family never compares things, but can show a patch, i.e. the difference to the ancestor(s).

> Also related, it looks like `--abbrev-commit' has no effect on `git
> rev-list', but does on `git log', even through it's documented in the
> former's man page.  So it looks like either there are more
> (undocumented?) differences, or maybe that's also a bug?

I consider this a bug. In fact, it has an effect, but not a visible one. You would have to use --abbrev=7 or such.

A patch is upcoming.

Cheers, Michael

Previous: Eli BarzilayNext: Michael J Gruber
Message 3 of 14 in “git rev-list formatting”
  1. Eli BarzilayMar 22, 2010
  2. Eli BarzilayMar 22, 2010
  3. Michael J GruberMar 22, 2010
  4. rev-list: heed --abbrev-commit optionMichael J Gruber, Mar 22, 2010
  5. Junio C HamanoMar 26, 2010
  6. Michael J GruberMar 27, 2010
  7. Eli BarzilayMar 22, 2010
  8. René ScharfeMar 22, 2010
  9. Eli BarzilayMar 23, 2010
  10. Michael J GruberMar 23, 2010
  11. Eli BarzilayMar 23, 2010
  12. Jeff KingMar 23, 2010
  13. Erik Faye-LundMar 23, 2010
  14. Eli BarzilayMar 23, 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.