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

Re: baffled again

From
Linus Torvalds <torvalds@osdl.org>
Date
Aug 24, 2005, 18:57 UTC
Message-ID
<Pine.LNX.4.58.0508241152240.3317@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.58.0508241140290.3317@g5.osdl.org>
On Wed, 24 Aug 2005, Linus Torvalds wrote:
Show 6 quoted lines
> 
> Basically, he had two branches, A and B, and both contained the same patch
> (but _not_ the same commit). One undid it, the other did not.  There's no
> real way to say which one is "correct", and both cases clearly merge
> perfectly, so both outcomes "patch applied" and "patch reverted" are
> really equally valid.

In fact, the case that git selected ("patch applied"), is not only the one that is very fundamentally the one git will always select in this kind of situation - in some respects is actually the nicer choice of the two.

While it may cause problems (ie the revert was the right thing to do), it's at least the state that is less likely to be "lost". Having a revert disappear is likely better than having a real change disappear. The reaction to the reverted code showing up again is likely "damn, won't that bug ever go away, I fixed it once already" - but at least people will see that it's fair: "it was applied twice, so let's revert it twice".

In contrast, the reaction to a patch going away is likely just very confusing: you have two people applying it, but only one reverting it will revert both, while the first person who applied it may never have realized it got reverted.

		Linus
Previous: Linus TorvaldsNext: Junio C Hamano
Message 7 of 10 in “baffled again”
  1. tony.luck@intel.comAug 23, 2005
  2. Tony LuckAug 24, 2005
  3. Linus TorvaldsAug 24, 2005
  4. Junio C HamanoAug 24, 2005
  5. Daniel BarkalowAug 24, 2005
  6. Linus TorvaldsAug 24, 2005
  7. Linus TorvaldsAug 24, 2005
  8. Junio C HamanoAug 25, 2005
  9. Tony LuckAug 25, 2005
  10. Daniel BarkalowAug 24, 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.