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

Re: [PATCH v2 0/2] DEFAULT_DOC_TARGET

From
Jeff King <peff@peff.net>
Date
Jan 3, 2013, 22:25 UTC
Message-ID
<20130103222537.GA12128@sigill.intra.peff.net>
In-Reply-To
<7v4nixx61c.fsf@alter.siamese.dyndns.org>
On Thu, Jan 03, 2013 at 02:20:31PM -0800, Junio C Hamano wrote:
Show 17 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > Not surprising for such a large refactoring, but this has conflicts with
> > what's in next. Here's the patch to apply on top of the conflicted tree
> > you get from merging this with "next":
> 
> Yeah, verifying the manual fixup is a bit tricky indeed.  The output from
> 
>  $ git blame -C HEAD^.. -- config.mak.uname | grep '^[^^]'
> 
> shows only the first line of the resulting file, and the output from
> 
>  $ git blame --reverse -C HEAD^.. -- Makefile | grep '^^'
> 
> shows only the three-line "Platform specific tweaks" comment, which
> was replaced by your version in config.mak.uname, so nothing extra
> was added and nothing important was lost between the two, it seems.

Yeah, it's probably easier to do than verify. I knew that my patch was a straight copy/paste move of the big if/else block, replacing it with the include. So the obvious resolution is to mechanically move the "theirs" block from next in the same way. And then the resulting diff shows the fixup (which you can verify does not do anything fancy).

It's really the same logic that merge-recursive uses for full-file renames, except that git is not smart enough to figure out that it was a 500-line block that moved, not the whole file. It comes up rarely enough that it is probably not worth trying to teach the merge machinery about code block movement. But it would be cool. :)

-Peff
Previous: Junio C Hamano
Message 9 of 9 in “DEFAULT_DOC_TARGET”
  1. 0/2 DEFAULT_DOC_TARGETJunio C Hamano, Jan 3, 2013
  2. 1/2 Allow generating a non-default set of documentationJunio C Hamano, Jan 3, 2013
  3. 2/2 Allow installing a non-default set of documentationJunio C Hamano, Jan 3, 2013
  4. Jeff KingJan 3, 2013
  5. Jeff KingJan 3, 2013
  6. Jeff KingJan 3, 2013
  7. Jeff KingJan 3, 2013
  8. Junio C HamanoJan 3, 2013
  9. Jeff KingJan 3, 2013

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.