From: Petr Baudis <pasky@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: git@vger.kernel.org
Subject: Re: git-log vs git-rev-list
Date: Fri, 30 May 2008 21:46:35 +0200 [thread overview]
Message-ID: <20080530194635.GI593@machine.or.cz> (raw)
In-Reply-To: <alpine.LFD.1.10.0805301021310.3141@woody.linux-foundation.org>
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
next prev parent reply other threads:[~2008-05-30 19:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-30 16:56 git-log vs git-rev-list Petr Baudis
2008-05-30 17:25 ` Linus Torvalds
2008-05-30 19:46 ` Petr Baudis [this message]
2008-05-30 20:20 ` Linus Torvalds
2008-05-30 21:34 ` Petr Baudis
2008-05-30 20:22 ` Linus Torvalds
2008-05-30 20:28 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080530194635.GI593@machine.or.cz \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).