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: Fri, 23 Jul 2010 20:57:06 -0400 [thread overview]
Message-ID: <AANLkTinyjinsGS2ddyMOW=3zDN1ThJcpF+dc4cBE6L9D@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=tDRfgzzcbp0jV=+hQ+Cs2fhNF0vK8JL1COoFu@mail.gmail.com>
On Fri, Jul 23, 2010 at 8:13 PM, Santi Béjar <santi@agolina.net> wrote:
> First my requirements:
>
> 1) Everything[a] must be available from the same repository/branch (so I'm not
> worried about repository size)
> 2) The history must be as clean as possible
> 3) The directory content must be equal to the external module, at least when
> you add/update it[b]
> 4) The external module should be able to switch back and forth between
> different versions.
>
> [a] Everything means all that you need to checkout all the commits in the
> superproject not in the submodule.
> [b] A consequence of #3 is that I lose all
> change I've made in the subdirectory, if they are important I have to extract
> them, apply them and add the module back.
>
> git-submodule is rule out because of #1 but accomplish #2, #3 and
> #4. git-subtree is rule out because of #2 (even with --squash).
> [It fails at] #3 and #4
> without --squash but accomplish #1 and #4 with --squash. So I need something
> in between or a mixture of both.
I admit to having had some trouble parsing the above, so I moved some
punctuation marks around. Please let me know if I've made a mistake.
If I understand correctly, you're claiming (indirectly) that
git-subtree without --squash does not accomplish #1. I don't see how
this is the case. Am I misreading? I think git-subtree accomplishes
#1 in both modes.
I don't understand what you mean when you say (#2) git-subtree doesn't
keep your history "as clean as possible." What is "as clean as
possible" and what part of git-subtree's history results don't you
like? (Of course it's very different with and without --squash.)
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?
And for #4, it's true that git-subtree without --squash does not allow
you to easily rewind to an older version of the submodule, while with
--squash it does.
It sounds to me like, if we added your patch to git-subtree, then
git-subtree --squash would solve #1, #3, and #4. And maybe we could
fix #2 as well. Correct?
Thanks,
Avery
next prev parent reply other threads:[~2010-07-24 0:57 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 [this message]
2010-07-24 8:33 ` Santi Béjar
2010-07-25 0:28 ` Santi Béjar
2010-07-26 5:02 ` Avery Pennarun
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='AANLkTinyjinsGS2ddyMOW=3zDN1ThJcpF+dc4cBE6L9D@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).