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

Re: [PATCH 1/9] Fix git patch header processing in git-apply.

From
Linus Torvalds <torvalds@osdl.org>
Date
Aug 30, 2005, 01:24 UTC
Message-ID
<Pine.LNX.4.58.0508291821010.3243@g5.osdl.org>
In-Reply-To
<7vacj06xi6.fsf@assigned-by-dhcp.cox.net>
On Mon, 29 Aug 2005, Junio C Hamano wrote:
Show 7 quoted lines
> 
> I, however, am not 100% convinced --ignore-applied is too
> dangerous to be useful in any conceivable use cases, at least
> not yet.  For example, you might be cherry-picking a change from
> a foreign branch with 'git-diff-tree -p other~45 | git apply',
> where the current branch may have already aquired part of the
> changes that foreign branch contains since 45 generations ago.

.. and that's why we use a three-way merge, and not diffs, to merge two branches.

--ignore-applied really is a pretty dangerous thing. I can see that it might do the right thing in many cases, but definitely not in a scripted environment, much less in an "import".

By definition, importing stuff must apply, since it clearly applied in whatever original source control tool you are importing from. So if an importer needs --ignore-applied, it is fundamentally doing something wrong.

And I just realized what "SourcePuller" is. Gaah. Trust me, that export is bad, and the original source control tool did everything very well indeed.

			Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 11 in “Fix git patch header processing in git-apply.”
  1. 1/9 Fix git patch header processing in git-apply.Robert Fitzsimons, Aug 28, 2005
  2. 2/9 Fix detection of files with only one line in git-apply.Robert Fitzsimons, Aug 28, 2005
  3. Linus TorvaldsAug 28, 2005
  4. Junio C HamanoAug 28, 2005
  5. Robert FitzsimonsAug 29, 2005
  6. Linus TorvaldsAug 30, 2005
  7. Junio C HamanoAug 30, 2005
  8. Linus TorvaldsAug 30, 2005
  9. Junio C HamanoAug 30, 2005
  10. Linus TorvaldsAug 30, 2005
  11. Martin LanghoffAug 30, 2005

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.