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

Re: Why would merge fail on a one-line addition?

From
Linus Torvalds <torvalds@osdl.org>
Date
Mar 26, 2006, 00:31 UTC
Message-ID
<Pine.LNX.4.64.0603251629330.15714@g5.osdl.org>
In-Reply-To
<20060325222601.GA1500@buici.com>
On Sat, 25 Mar 2006, Marc Singer wrote:
Show 12 quoted lines
> One of the unmerged files leaves this trail.
> 
>   elf@florence ~...git/linux-2.6 > git-ls-files --unmerged
>   100644 6262d449120cdcde5db1b079806dcc0d9b5e6b7c 1       arch/arm/mach-lh7a40x/irq-lpd7a40x.c
>   100644 dcb4e17b941990eabe8992680c9aa9b67afb6fd4 3       arch/arm/mach-lh7a40x/irq-lpd7a40x.c
> 
>   elf@florence ~...git/linux-2.6 > git-cat-file blob 6262d449120cdcde5db1b079806dcc0d9b5e6b7c > a
>   elf@florence ~...git/linux-2.6 > git-cat-file blob dcb4e17b941990eabe8992680c9aa9b67afb6fd4 > b
>   elf@florence ~...git/linux-2.6 > diff a b                                       21a22
>   > #include "common.h"
> 
> Why would git have a problem with this?

That whole file was apparently removed in the branch you are merging into (no stage 2). So what should the merge do? Throw away the one-liner addition (likely the correct thing) or maybe it should go somewhere else (ie maybe it wasn't removed outright, but the contents moved into another file, which would now need the one-line addition).

		Linus
Previous: Marc SingerNext: Junio C Hamano
Message 2 of 3 in “Why would merge fail on a one-line addition?”
  1. Marc SingerMar 25, 2006
  2. Linus TorvaldsMar 26, 2006
  3. Junio C HamanoMar 26, 2006

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.