git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] revision: make pseudo-opt flags read via stdin behave consistently

From
Patrick Steinhardt <ps@pks.im>
Date
Sep 25, 2023, 12:51 UTC
Message-ID
<ZRGCUYxsN_jgkmCO@tanuki>
In-Reply-To
<xmqqmsxf5owk.fsf@gitster.g>
On Thu, Sep 21, 2023 at 12:04:11PM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <ps@pks.im> writes:
[snip]
Show 24 quoted lines
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> > Reported-by: Christian Couder <christian.couder@gmail.com>
> > ---
> >  Documentation/rev-list-options.txt |  6 +++++-
> >  revision.c                         | 10 +++++-----
> >  t/t6017-rev-list-stdin.sh          | 21 +++++++++++++++++++++
> >  3 files changed, 31 insertions(+), 6 deletions(-)
> >
> > diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
> > index a4a0cb93b2..9bf13bac53 100644
> > --- a/Documentation/rev-list-options.txt
> > +++ b/Documentation/rev-list-options.txt
> > @@ -151,6 +151,8 @@ endif::git-log[]
> >  --not::
> >  	Reverses the meaning of the '{caret}' prefix (or lack thereof)
> >  	for all following revision specifiers, up to the next `--not`.
> > +	When used on the command line before --stdin, the revisions passed
> > +	through stdin will not be affected by it.
> 
> Do we also need to say "when read from --stdin, the revisions passed
> on the command line are not affected" as well?  I know you have it
> where you explian "--stdin" in the next hunk, but since you are
> adding one-half of the interaction, it may be less confusing to also
> mention the other half at the same time.

Doesn't hurt to make this more explicit as well, yes. I'll send a v2 that adds this bit.

Thanks!
Patrick
Show 13 quoted lines
> > @@ -240,7 +242,9 @@ endif::git-rev-list[]
> >  	them from standard input as well. This accepts commits and
> >  	pseudo-options like `--all` and `--glob=`. When a `--` separator
> >  	is seen, the following input is treated as paths and used to
> > -	limit the result.
> > +	limit the result. Flags like `--not` which are read via standard input
> > +	are only respected for arguments passed in the same way and will not
> > +	influence any subsequent command line arguments.
> 
> Other than that, looking good, and the changes to the code look all
> sensible.
> 
> Thanks.
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 6 of 7 in “revision: make pseudo-opt flags read via stdin behave consistently”
  1. revision: make pseudo-opt flags read via stdin behave consistentlyPatrick Steinhardt, Sep 21, 2023
  2. Taylor BlauSep 21, 2023
  3. Patrick SteinhardtSep 25, 2023
  4. Taylor BlauSep 25, 2023
  5. Junio C HamanoSep 21, 2023
  6. Patrick SteinhardtSep 25, 2023
  7. revision: make pseudo-opt flags read via stdin behave consistentlyPatrick Steinhardt, Sep 25, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.