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