From: Linus Torvalds <torvalds@linux-foundation.org>
To: Alan <alan@clueserver.org>
Cc: git@vger.kernel.org
Subject: Re: Odd merge behaviour involving reverts
Date: Thu, 18 Dec 2008 16:21:25 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.2.00.0812181614070.14014@localhost.localdomain> (raw)
In-Reply-To: <1229645511.5770.29.camel@rotwang.fnordora.org>
On Thu, 18 Dec 2008, Alan wrote:
>
> I think I know how to fix it. I am just concerned about having it occur
> again if someone else makes the same mistake I did.
I suspect we should warn about reverting merges. I'm surprised we don't
already. Reverting a merge isn't "wrong", but it's a whole lot more subtle
than reverting a regular commit.
Reverting a regular commit just effectively undoes what that commit did,
and is fairly straightforward. But reverting a merge commit also undoes
the _data_ that the commit changed, but it does absolutely nothing to the
effects on _history_ that the merge had.
So the merge will still exist, and it will still be seen as joining the
two branches together, and future merges will see that merge as the last
shared state - and the revert that reverted the merge brought in will not
affect that at all.
So a "revert" undoes the data changes, but it's very much _not_ an "undo"
in the sense that it doesn't undo the effects of a commit on the
repository history.
So if you think of "revert" as "undo", then you're going to always miss
this part of reverts. Yes, it undoes the data, but no, it doesn't undo
history.
Linus
next prev parent reply other threads:[~2008-12-19 0:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-18 23:25 Odd merge behaviour involving reverts Alan
2008-12-18 23:58 ` Linus Torvalds
2008-12-19 0:11 ` Alan
2008-12-19 0:21 ` Linus Torvalds [this message]
2008-12-19 0:35 ` Alan
2008-12-19 0:46 ` Linus Torvalds
2008-12-19 3:44 ` Nanako Shiraishi
2008-12-19 4:01 ` Linus Torvalds
2008-12-19 4:18 ` Jay Soffian
2008-12-19 4:23 ` Linus Torvalds
2008-12-19 5:24 ` Daniel Barkalow
2008-12-19 8:45 ` Junio C Hamano
2008-12-19 21:45 ` Nanako Shiraishi
2008-12-19 23:05 ` Junio C Hamano
2008-12-19 23:12 ` Nanako Shiraishi
2008-12-19 23:51 ` Junio C Hamano
2008-12-19 1:30 ` Boyd Stephen Smith Jr.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0812181614070.14014@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=alan@clueserver.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox