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

Re: [PATCH 2/2] rebase: teach --autosquash to match on sha1 in addition to message

From
Kevin Ballard <kevin@sb.org>
Date
Nov 4, 2010, 21:35 UTC
Message-ID
<F2547972-0FEF-4123-96AF-75F60967DAB5@sb.org>
In-Reply-To
<AANLkTikA_46ZdrRBCnh-1Rx1jfqGb377jeg=9OO5T3Tr@mail.gmail.com>
On Nov 4, 2010, at 3:44 AM, Sverre Rabbelier wrote:
Show 12 quoted lines
> On Thu, Nov 4, 2010 at 05:49, Kevin Ballard <kevin@sb.org> wrote:
>> I just realized that this only works for sha1's of up to 7 characters.
>> If you provide more it won't match, as it's comparing against the sha1
>> given in the todo list. I wonder if it's worth resolving all sha1s to
>> their full length if the provided string is longer than 7 characters?
> 
> Well, not if you're resolving them based on the 7-character string
> from the rebase todo list. If you run in to ambiguity with those
> 7-length hash we should instead increase the length of the hashes in
> the todo list.
> 
> So I'd say, solve this by doing a prefix match?

Prefix match of what against what? If the 7-character string used in the TODO list is already ambiguous, then the rebase itself would be expected to fail. I'm inclined to just try to resolve the message in the fixup! line itself to a full SHA1, and if that works, then try to match the 7-character sha1 with a prefix comparison.

-Kevin Ballard
Previous: Sverre RabbelierNext: Junio C Hamano
Message 5 of 13 in “rebase: better rearranging of fixup!/squash! lines with --autosquash”
  1. 1/2 rebase: better rearranging of fixup!/squash! lines with --autosquashKevin Ballard, Nov 4, 2010
  2. 2/2 rebase: teach --autosquash to match on sha1 in addition to messageKevin Ballard, Nov 4, 2010
  3. Kevin BallardNov 4, 2010
  4. Sverre RabbelierNov 4, 2010
  5. Kevin BallardNov 4, 2010
  6. Junio C HamanoNov 4, 2010
  7. 1/2 rebase: better rearranging of fixup!/squash! lines with --autosquashKevin Ballard, Nov 4, 2010
  8. 2/2 rebase: teach --autosquash to match on sha1 in addition to messageKevin Ballard, Nov 4, 2010
  9. Peter KreftingNov 5, 2010
  10. 1/2 rebase: better rearranging of fixup!/squash! lines with --autosquashKevin Ballard, Nov 8, 2010
  11. Yann DirsonNov 8, 2010
  12. Kevin BallardNov 8, 2010
  13. 2/2 rebase: teach --autosquash to match on sha1 in addition to messageKevin Ballard, Nov 8, 2010

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.