git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: "Santi Béjar" <santi@agolina.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: RFC: Between git-subtree and git-submodules
Date: Mon, 26 Jul 2010 01:02:54 -0400	[thread overview]
Message-ID: <AANLkTim_XeoEeRBa8VCLMn=rbFb3mvKm6OJ=M7D6YJBz@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikwpruLt-D0tYn+eP5JpB1h0RD55+xr_7S+RfOa@mail.gmail.com>

On Sat, Jul 24, 2010 at 8:28 PM, Santi Béjar <santi@agolina.net> wrote:
>> With #3, I can see that you want something different than I do; you
>> want to silently revert your own patches out of the submodule's
>> history, when you upgrade the submodule to a new version.  Personally,
>> I find this concept a bit objectionable (it's like "git merge -s
>> ours"), but okay, it's pretty easy to implement, and you've submitted
>> a patch to git-subtree that does it.  My question is: why would you
>> want this?  Isn't it clearer to 'git revert' the patches you don't
>> want?
>
> While writing the docs for the --prune option I've found this sentence in
> git-subtree.txt:
>
>        'git subtree merge --squash'
>        always adjusts the subtree to match the exactly
>        specified commit, even if getting to that commit would
>        require undoing some changes that were added earlier.
>
> I think this is not true, and it contradicts with what you've just said. Or I
> don't understand it correctly.

I agree that this is a bit unclear.  Basically it rewinds the *base*
of the subtree to match the commit you specify.  Patches you've
applied locally are not removed.

What it actually does is it creates a new commit that applies the
following patch:

    git diff oldbase newbase

If you've made any of your own patches that conflict with this, it'll
generate the conflict and then stop.  Otherwise it'll merge in your
changes as you might expect.

Have fun,

Avery

      reply	other threads:[~2010-07-26  5:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-24  0:13 RFC: Between git-subtree and git-submodules Santi Béjar
2010-07-24  0:57 ` Avery Pennarun
2010-07-24  8:33   ` Santi Béjar
2010-07-25  0:28   ` Santi Béjar
2010-07-26  5:02     ` Avery Pennarun [this message]

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='AANLkTim_XeoEeRBa8VCLMn=rbFb3mvKm6OJ=M7D6YJBz@mail.gmail.com' \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=santi@agolina.net \
    /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;
as well as URLs for NNTP newsgroup(s).