git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: rev-parse vs. rev-list --no-walk
Date: Mon, 03 May 2010 17:50:19 +0200	[thread overview]
Message-ID: <4BDEF0BB.6080009@drmicha.warpmail.net> (raw)
In-Reply-To: <t2z76718491005030822l469c720ag1466ecd2bad31f32@mail.gmail.com>

Jay Soffian venit, vidit, dixit 03.05.2010 17:22:
> On Sat, May 1, 2010 at 4:05 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> I think one sane thing to do is to stop adding new rev-flags revision.c
>> supports to rev-parse (it already lags behind and nobody complained that
>> rev-parse doesn't understand --first-parent as a rev-flag), and keep its
>> use as "revision and non revision option sifter" only to support older
>> scripts written back in v1.0.0 days.  Its primary use these days is "turn
>> symbolic object names into 40-letter SHA-1", but "option sifter" aspect of
>> the command seems to have outlived its usefulness.
> 
> We tell scripters to be careful to use the plumbing and not the
> porcelain. From that standpoint, shouldn't we do our best to prevent
> the plumbing from falling into disrepair?

According to git(1), git rev-list is low-level, but git rev-parse is not!

>From a cursory look at current source it would be simple to discourage
use of rev-parse for revision flags (and, probably, as an option
sifter). There's no need to remove them (and break some outside
scripts). Junio suggested not to add any new ones to rev-parse. That
would make my RFD patch (--heads, --locals) smaller, and answers the
questions about solving the difference between rev-parse and rev-list
"-all" regarding HEAD. But maybe git-rev-parse(1) should change then, in
order not to encourage its use as option sifter. Everyone stops by this
man page when looking up revision syntax.

Michael

      reply	other threads:[~2010-05-03 15:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-01 18:35 rev-parse vs. rev-list --no-walk Michael J Gruber
2010-05-01 20:05 ` Junio C Hamano
2010-05-03 15:22   ` Jay Soffian
2010-05-03 15:50     ` Michael J Gruber [this message]

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=4BDEF0BB.6080009@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.com \
    /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).