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

Re: [PATCH 1/3] patch-id: make it stable against hunk reordering

From
MTMichael S. Tsirkin <mst@redhat.com>
Date
Mar 27, 2014, 17:34 UTC
Message-ID
<20140327173455.GB2593@redhat.com>
In-Reply-To
<xmqqvbuzefy6.fsf@gitster.dls.corp.google.com>
On Thu, Mar 27, 2014 at 09:58:41AM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> "Michael S. Tsirkin" <mst@redhat.com> writes:
> 
> > Patch id changes if you reorder hunks in a diff.
> 
> If you reorder hunks, the patch should no longer apply [*1*], so a
> feature to make patch-id stable across such move would have no
> practical use ;-), but I am guessing you meant something else.
> 
> Perhaps this is about using "-O <orderfile>" option, even though you
> happened to have implemented the id mixing at per-hunk level?
Yes.
Show 8 quoted lines
> 
> [Footnote]
> 
> *1* It has been a long time since I looked at the code, and I do not
> know offhand if "git apply" has such a bug not to diagnose a hunk
> for a file for an earlier part that comes later in its input stream
> after seeing another hunk for the same file as a bug. If it does
> not, perhaps we should.

Hmm you are right. For some reason I thought that it does work. I'll drop this part then, less code this way.

Thanks!
Any more comments before I spin v2?
-- 
MST
Previous: Junio C HamanoNext: Michael S. Tsirkin
Message 6 of 10 in “patch-id: make it stable against hunk reordering”
  1. 1/3 patch-id: make it stable against hunk reorderingMichael S. Tsirkin, Mar 27, 2014
  2. 2/3 patch-id: document new behaviourMichael S. Tsirkin, Mar 27, 2014
  3. 3/3 patch-id-test: test new --stable and --unstable flagsMichael S. Tsirkin, Mar 27, 2014
  4. Eric SunshineMar 28, 2014
  5. Junio C HamanoMar 27, 2014
  6. Michael S. TsirkinMar 27, 2014
  7. Michael S. TsirkinMar 27, 2014
  8. Junio C HamanoMar 27, 2014
  9. Michael S. TsirkinMar 27, 2014
  10. Michael S. TsirkinMar 27, 2014

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.