All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nanako Shiraishi <nanako3@lavabit.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan <alan@clueserver.org>, git@vger.kernel.org
Subject: Re: Odd merge behaviour involving reverts
Date: Fri, 19 Dec 2008 12:44:52 +0900	[thread overview]
Message-ID: <20081219124452.6117@nanako3.lavabit.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0812181534310.14014@localhost.localdomain>

Quoting Linus Torvalds <torvalds@linux-foundation.org>:

> On Thu, 18 Dec 2008, Alan wrote:
>> 
>> What am i doing wrong here?
>
> Reverting a merge is your problem.
>
> You can do it, but you seem to have done it without understanding what it 
> causes.
>
> A revert of a merge becomes a regular commit that just undoes everything 
> that the merge did in your branch. When you then do the next merge, you'll 
> do that merge with that in mind, so now git will essentially consider the 
> previous merge to be the base line, but your revert undid everything that 
> that one brought in, so the new merge will really only contain the new 
> stuff from the branch you are merging. 
>
> So if a merge causes problems, you generally should either undo it 
> _entirely_ (ie do a 'git reset --hard ORIG_HEAD'), not revert it. 
>
> Of course, if you had already made the merged state public, or done 
> development on top of it, you can't really do that. In which case a revert 
> works, but if you want it back, you should revert the revert, not merge 
> the branch again - because what you merged last time you threw away, and 
> won't be applied again.

If I understand Alan's case correctly, I think he does not want to "undo" the revert but wants to merge an updated version of the branch, as if no mistaken merge nor its revert happened in the past.

If you revert the revert on the branch before merging, doesn't it mean that you will be merging what the older version of the branch did (that is in the revert of the revert as a single huge patch) and what the updated version of the branch wants to do?  Wouldn't that lead to a mess with huge conflicts?

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

  parent reply	other threads:[~2008-12-19  3:46 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
2008-12-19  0:35       ` Alan
2008-12-19  0:46         ` Linus Torvalds
2008-12-19  3:44   ` Nanako Shiraishi [this message]
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=20081219124452.6117@nanako3.lavabit.com \
    --to=nanako3@lavabit.com \
    --cc=alan@clueserver.org \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.