git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Paolo Bonzini <bonzini@gnu.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Re: Make 'git show' more useful
Date: Mon, 13 Jul 2009 17:00:42 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0907131652120.13838@localhost.localdomain> (raw)
In-Reply-To: <1247528614-24590-1-git-send-email-bonzini@gnu.org>



On Tue, 14 Jul 2009, Paolo Bonzini wrote:
> 
> So, what about squashing this with Linus's patch?  (This is meant to be
> squashed, which is why this text is not in a cover letter).

I wouldn't squash it.

That said, in the original commit that introduced "no_walk" (ba1d4505), I 
said

    I was going to add "--no-walk" as a real argument flag to git-rev-list
    too, but I'm not sure anybody actually needs it. Although it might be
    useful for porcelain, so I left the door open.

and I never actually did it. That was Apr 15, 2006.

The actual "--no-walk" flag was then added over a year later by Dsco, in 
commit 8e64006eee ("Teach revision machinery about --no-walk").

Doing a "git log -p -S--no-walk", I have to admit that I don't find a 
single actual _use_ of --no-walk. And it obviously wasn't even exported 
until a year after it was internally implemented.

So I have to agree with the fact that "--no-walk" and "--do-walk" seem to 
be pretty worthless as command line switches.  Removing them might be a 
good thing.

However, doing some googling, I do actually find examples of it on the 
web. And some of them even appear valid:

	second_parent=$(git rev-list --no-walk --parents $newrev | sed 's/ /\n/g' | grep -v $newrev | tail --lines=1)

because you can't use "git rev-parse" with --parents (of course, I'm not 
at all clear on why it doesn't do

	second_parent=$(git rev-parse "$newrev"^2)

but that's really immaterial - the point is that "git rev-parse" is _not_ 
a replacement for "git rev-list --no-walk").

So I dunno. I think we might as well leave --no-walk and --do-walk around, 
even though they are of dubious value. They do mirror the internal 
revision walking logic very directly. 

			Linus

  reply	other threads:[~2009-07-14  0:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 21:41 Make 'git show' more useful Linus Torvalds
2009-07-13 22:11 ` Junio C Hamano
2009-07-13 23:43   ` [PATCH] " Paolo Bonzini
2009-07-14  0:00     ` Linus Torvalds [this message]
2009-07-14  1:25       ` Johannes Schindelin
2009-07-14  1:47         ` Linus Torvalds
2009-07-14  6:25         ` Paolo Bonzini
2009-07-14 10:44           ` Johannes Schindelin
2009-07-14 12:08             ` [PATCH] t4202-log.sh: Test git log --no-walk sort order Michael J Gruber
2009-07-14 12:21               ` Johannes Sixt
2009-07-14 12:38                 ` Michael J Gruber
2009-07-14 12:45                 ` [PATCHv2] " Michael J Gruber
2009-07-14 14:13                   ` Johannes Schindelin
2009-07-14 14:28                     ` Michael J Gruber
2009-07-17 14:28                     ` [PATCH] " Michael J Gruber
2009-07-17 14:53                       ` Johannes Schindelin
2009-07-13 23:42 ` Make 'git show' more useful Johannes Schindelin

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=alpine.LFD.2.01.0907131652120.13838@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=bonzini@gnu.org \
    --cc=git@vger.kernel.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).