git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Philip Oakley" <philipoakley@iee.org>
To: "Git List" <git@vger.kernel.org>,
	"Michael J Gruber" <git@drmicha.warpmail.net>
Subject: Re: clarification of `rev-list --no-walk ^<rev>`?
Date: Mon, 19 Sep 2016 15:46:50 +0100	[thread overview]
Message-ID: <033051503D8C4F618B1E4879AFF8C28D@PhilipOakley> (raw)
In-Reply-To: 3b06b9ee-3975-acf1-41d8-02b774a2dd3c@drmicha.warpmail.net

From: "Michael J Gruber" <git@drmicha.warpmail.net>
> Philip Oakley venit, vidit, dixit 19.09.2016 12:56:
>> A question came up on the Git user list regarding cherry-pick that got me
>> reading the manual (again), in this case regarding --no-walk ranges.
>>
>> Essentially my question is: If --no-walk is given to rev-list (e.g. via
>> charry-pick), and the user includes a caret prefixed rev, when does that
>> range definition take effect on the command line, especially in light of
>> the --do-walk option?
>>
>> In rev-list(1) there are only 8 references to  'range', with only
>> the --no-walk option saying "This has no effect if a range is specified."
>> but leaving open the decision as to what does (and does not) comprises 
>> the
>> specification of a range on the cli.
>>
>> The two and three dot notations are fairly obvious ranges from
>> gitrevisions(7) as they are complete strings, while the caret prefix is 
>> an
>> implied range (it needs additional parameters to complete the range, and
>> there-in lies the issue).
>>
>> It can be read that
>>
>> $ git cherry-pick maint next
>>
>> would pick two single commits, while
>>
>> $ git cherry-pick maint next ^master
>>
>> could implicitly be read as
>>
>> $ git cherry-pick maint next --do-walk ^master
>>
>> because the ^ caret starts the range that cancels the --no-walk.
>>
>> Clearly that's not what is intended, which is
>>
>> $ git cherry-pick --do-walk maint next ^master
>>
>> but it is open to interpretation as to where in the command line the 
>> caret
>> range prefix's --do-walk (to countermand the --no-walk) should applied.
>>
>> If the user did want just the single commit at the tip of maint, and then
>> the range master..next, what would be their command line, and also, how
>> would the man page warn against false expectations?
>
> Maybe:
>
> Every negative rev (rev prefixed with ^, or a range) implies a
> `--do-walk` (right at its position on the command line).
>
> And then curb the misleading range sentence in the `--no-walk` 
> description.

At the moment the cherry-pick man page's example implies that --do-walk is 
applied from the beginning, rather from the point given on the command line.

I had a very quick search of the *.c code for the options but didn't get any 
further. Hopefully the user issue/misunderstanding is elsewhere... I'll add 
this to my little list.

--
Philip 


  reply	other threads:[~2016-09-19 14:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 10:56 clarification of `rev-list --no-walk ^<rev>`? Philip Oakley
2016-09-19 13:46 ` Michael J Gruber
2016-09-19 14:46   ` Philip Oakley [this message]
2016-09-19 16:19     ` Junio C Hamano
2016-09-19 16:12   ` Junio C Hamano
2016-09-19 19:31     ` Philip Oakley
2016-09-19 19:58       ` Junio C Hamano
2016-09-19 20:12         ` Philip Oakley
2016-09-19 21:00           ` Junio C Hamano
2016-09-19 20:44         ` Philip Oakley
2016-09-21 14:46     ` Michael J Gruber
2016-09-21 14:51       ` Michael J Gruber
2016-09-21 16:15       ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=033051503D8C4F618B1E4879AFF8C28D@PhilipOakley \
    --to=philipoakley@iee.org \
    --cc=git@drmicha.warpmail.net \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).