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

Re: [PATCH] Allow stashes to be referenced by index only

From
Jeff King <peff@peff.net>
Date
Oct 24, 2016, 12:54 UTC
Message-ID
<20161024125452.o3xvl3q2lmmwr5qu@sigill.intra.peff.net>
In-Reply-To
<CAB0+k9JrX7Ax26HfTEgoSyj02szFyHLayqTyW6KPuxVvXBOEOw@mail.gmail.com>
On Sun, Oct 23, 2016 at 01:41:25PM -0400, Aaron and Ashley Watson wrote:
Show 16 quoted lines
> > But what's going on here? Why did we bother running rev-parse earlier if
> > we don't actually use the value of REV?
> >
> > You mentioned tweaking it to fix a broken test, and indeed, just using
> > $REV here breaks a few tests in t3903.
> >
> > Offhand, I do not see anything wrong with pulling the non-option values
> > out in the loop. But in that case I think the assignment of REV can just
> > go away completely.
> >
> 
> The only reason for REV to remain is to preserve the error message seen with
> the previous behavior. Perhaps it would be better to instead move the
> assignment
> of REV to the only place it is still used: the error message when multiple
> arguments were detected.

Ah, thanks, I missed that use. We suppress stderr, so we're literally just getting the set of revs there. But that should match what we have in ARGV anyway (after all, $ARGV is where we decided we had too many revs, and what we'll feed to rev-parse to get the sha1).

So I wonder if:
  Too many revisions specified: $ARGV

would be more appropriate (at which point you can probably just continue to call it $REV).

> I'm not sure of the next steps in the process of submitting a patch.
> Should I submit a new patch by replying to this email, or is using git
> send-email to create a new mail thread better?

Generally re-rolls of a patch are done as replies to the original. Gmail is bad about corrupting whitespace, though, so you can't just reply and paste the patch in there. You can use ask git-send-email to continue the thread, though:

  mid=1473378397-22453-1-git-send-email-watsona4@gmail.com
  git send-email --in-reply-to=$mid ...other options...

You might also want to cc the people involved in the earlier discussion. The public-inbox archive gives a customized full send-email command for each message to make it easy.

  http://public-inbox.org/git/1473378397-22453-1-git-send-email-watsona4@gmail.com/
-Peff
Previous: Ramsay Jones
Message 8 of 8 in “Allow stashes to be referenced by index only”
  1. Allow stashes to be referenced by index onlyAaron M Watson, Sep 8, 2016
  2. Jeff KingOct 23, 2016
  3. Allow stashes to be referenced by index onlyAaron M Watson, Oct 24, 2016
  4. Jeff KingOct 25, 2016
  5. Aaron and Ashley WatsonOct 25, 2016
  6. Junio C HamanoOct 25, 2016
  7. Ramsay JonesOct 26, 2016
  8. Jeff KingOct 24, 2016

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.