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

Re: [PATCH] rebase -i: Fix possibly wrong onto hash in todo

From
AKAntti Keränen <antti@keraset.fi>
Date
Aug 11, 2020, 18:15 UTC
Message-ID
<20200811181537.qt7jkoxy7qn3k7mo@haukka.localdomain>
In-Reply-To
<20200811153621.GD19871@syl.lan>
Hi Phillip and Taylor.
On Tue, Aug 11, 2020 at 04:32:37PM +0100, Phillip Wood wrote:
Show 7 quoted lines
> > I'm not sure it's worth rearranging these lines. It probably does not matter
> > but we could do
> >
> > +	char shortonto[GIT_MAX_HEXSZ + 1];
> >
> > and then later call find_unique_abbrev_r() instead so we don't have to worry
> > about freeing shortonto.
I like this. I'll change the code, if the rest of the patch is okay.
> > Thanks for taking the trouble to add a test, I think all the lines above
> > could be simplified to
> >
> > 	GIT_SEQUENCE_EDITOR=cat git rebase -i HEAD~5 branch1 >actual

Nice! :) There was a test called 'todo count' which I mimicked. This obviously is much cleaner solution, thanks.

> > we could lose the final .*
Ack.
On Tue, Aug 11, 2020 at 11:36:21AM -0400, Taylor Blau wrote:
> Ack, I noticed this too during my review, but apparently forgot to
> comment on it. I'm puzzled by the first '..*'. If you're searching for
> any non-empty string, how about '.+' instead?

That's true. Good point. I pretty much copy&pasted the 'todo count' test so I didn't give this much thought. I'll fix this.

-- 
Antti
Previous: Taylor BlauNext: Junio C Hamano
Message 7 of 13 in “rebase -i: Fix possibly wrong onto hash in todo”
  1. rebase -i: Fix possibly wrong onto hash in todoAntti Keränen, Aug 11, 2020
  2. Taylor BlauAug 11, 2020
  3. Antti KeränenAug 11, 2020
  4. Taylor BlauAug 11, 2020
  5. Phillip WoodAug 11, 2020
  6. Taylor BlauAug 11, 2020
  7. Antti KeränenAug 11, 2020
  8. Junio C HamanoAug 11, 2020
  9. Taylor BlauAug 11, 2020
  10. Junio C HamanoAug 11, 2020
  11. Taylor BlauAug 12, 2020
  12. Junio C HamanoAug 12, 2020
  13. Phillip WoodAug 12, 2020

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.