Subject: Re: git-log vs git-rev-list

From: Petr Baudis <[email-masked]>
Date: Fri, 30 May 2008 21:46:35 +0200

On Fri, May 30, 2008 at 10:25:47AM -0700, Linus Torvalds wrote:
> On Fri, 30 May 2008, Petr Baudis wrote:
> > 
> >   * git log --pretty=format is actually sane and does not pollute the
> > output with spurious 'commit' lines
> 
> Why would you want to use "git-rev-list" at all?

Because it was the natural command to access history from a script to me
and nothing in the documentation hinted me that I shouldn't use it.

> The common case for git-rev-list is for things that git log simply won't 
> do, ie things like "git rev-list --all --objects" that is a nonsensical 
> operation to do on "git log".

Step back a bit: it's git-_REV_-list. Technically, --all --objects is
nonsensical operation to do on revision list either.

> >   I think that having two commands that by now do essentially the same
> > thing, but slightly differently, is rather messy UI. Thus, I'm wondering
> > if it would be worthwhile to make rev-list a thin git-log wrapper and
> > start phasing it out?
> 
> It already is. It's already phased out in the sense that I don't see why 
> you complain. If you don't like it, don't use it. It has legacy reasons 
> for existing, and it does *some* things that are simply not sensible at 
> all for "git log" (ie the non-commit things).

But there is no indication that it is phased out whatsoever. My point is
that presence of this command is confusing. If it is going to stand
around for non-commit things, it should be called 'git-object-list' or
something, and the difference to git-log should be made clear. But I
think there is no fundamental reason why git-log shouldn't be made able
to list non-commit objects either.

> >   Yes, git-rev-list is supposed to be a plumbing thing, but from my
> > porcelain, I actually have to use git-log anyway [..]
> 
> So why do you care?

Because it confused me, I'm probably not the first to be confused and it
will probably confuse others in the future too. The UI should be more
consistent.

-- 
				Petr "Pasky" Baudis
Whatever you can do, or dream you can, begin it.
Boldness has genius, power, and magic in it.	-- J. W. von Goethe