From: Michael J Gruber <git@drmicha.warpmail.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Matthieu Moy <Matthieu.Moy@imag.fr>,
Ilari Liusvaara <ilari.liusvaara@elisanet.fi>,
Pierre Habouzit <madcoder@madism.org>
Subject: Re: [WRONG/PATCH 1/3] revisions: clarify handling of --no-walk and --do-walk
Date: Tue, 26 Apr 2011 10:19:11 +0200 [thread overview]
Message-ID: <4DB67FFF.1060709@drmicha.warpmail.net> (raw)
In-Reply-To: <20110425002124.GB31168@elie>
Jonathan Nieder venit, vidit, dixit 25.04.2011 02:21:
> Michael J Gruber wrote:
>
>> We don't do the systematic approach now. In some situations, some
>> commands switch on the walker automatically (I think "show A..B") to
>> make things more useful (to most users) but less systematic, even less
>> predictable if you don't know these deviations/exceptions. I've
>> suggested such a "usefulness exception" myself (don't prune commits by
>> path for "show").
>
> Ah. To be clearer about the present state:
>
> - cmd_show reimplements much of get_revision, to work around the
> revision walking machinery's lack of callbacks to print tags,
> blobs, and so on.
>
> - ^A means "--do-walk ^A", and A..B means "--do-walk ^A B". This
> holds in rev-list, log, show, etc --- they all share the code that
> does this.
>
> - Similarly, -5 means "--do-walk -5".
>
> - rev-parse shares a revision parser (get_sha1) with rev-list, but it
> doesn't share an option parser (alas).
>
> I personally kind of like the "don't prune commits by path with
> --no-walk" idea. Not sure what happened to that.
It got dropped after the switch to the new cycle. The question/problem
was whether some people used "git show A B C -- path" as a kind of
commit filter, selecting only commits which touch path (i.e. prune
commits by path). I would claim it's the wrong command to do that and
was never documented anyways...
So, my choice would be "do not prune commits unless --do-walk was given"
(where "was given" may include "was switched on by our range=>walk logic").
Another choice would be "do not prune if there is only one rev argument
and no --do-walk".
> Ah. To be clearer about the present state:
>
> - cmd_show reimplements much of get_revision, to work around the
> revision walking machinery's lack of callbacks to print tags,
> blobs, and so on.
>
You mean, other than pretty formats... I think our code does a couple of
things by hand which could be done with a pretty format. Though a
callback may be more efficient, unless our formats are pre-parsed.
Michael
next prev parent reply other threads:[~2011-04-26 8:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 10:22 [PATCH/RFC 0/3] teaching log's --glob=<glob> and friends to git shortlog Jonathan Nieder
2011-04-21 10:39 ` [WRONG/PATCH 1/3] revisions: clarify handling of --no-walk and --do-walk Jonathan Nieder
2011-04-21 13:03 ` Michael J Gruber
2011-04-21 21:30 ` Jonathan Nieder
2011-04-24 11:28 ` Michael J Gruber
2011-04-25 0:21 ` Jonathan Nieder
2011-04-26 8:19 ` Michael J Gruber [this message]
2011-04-21 10:45 ` [PATCH 2/3] revisions: split out handle_revision_pseudo_opt function Jonathan Nieder
2011-04-21 10:48 ` [PATCH 3/3] revisions: allow --glob and friends in parse_options-enabled commands Jonathan Nieder
2011-04-21 17:40 ` [PATCH/RFC 0/3] teaching log's --glob=<glob> and friends to git shortlog Junio C Hamano
2011-04-21 21:16 ` Jonathan Nieder
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=4DB67FFF.1060709@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=Matthieu.Moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=ilari.liusvaara@elisanet.fi \
--cc=jrnieder@gmail.com \
--cc=madcoder@madism.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.