From: Marc Branchaud <marcnarc@xiplink.com>
To: "Andreas T.Auer" <andreas.t.auer_gtml_37453@ursus.ath.cx>
Cc: Jens Lehmann <Jens.Lehmann@web.de>,
Phil Hord <phil.hord@gmail.com>,
git@vger.kernel.org
Subject: Re: Auto update submodules after merge and reset
Date: Wed, 14 Dec 2011 10:16:39 -0500 [thread overview]
Message-ID: <4EE8BDD7.1080507@xiplink.com> (raw)
In-Reply-To: <4EE7DA2C.7000300@ursus.ath.cx>
On 11-12-13 06:05 PM, Andreas T.Auer wrote:
>
> On 13.12.2011 22:44 Jens Lehmann wrote:
>>
>> If you follow a tip there won't be any new SHA-1s recorded during
>> that following so you could not do a bisect and expect the submodule
>> to be what the developer had when doing the commits, no?
>
> If you never commit something to the superproject, you wouldn't get SHA1s
> recorded, that's right. But when you commit something to the superproject,
> why shouldn't the current submodule SHA1 be stored? Floating is about
> _ignoring_ the recorded SHA1 in _some_ cases, not about disabling the
> recording. So you can bisect to the bad superproject commit. If you suspect a
> bad submodule commit causing the problem then you could still bisect the
> submodule commits between the recorded SHA1s.
To me this question is one of the more problematic aspects of floating
submodules: When to commit submodule SHA1s.
Andreas suggests always committing them whenever a submodule's tip is moved.
I don't think this is practical because commits end up with extra changes
that likely have nothing to do with the commit's topic. This makes it
difficult to merge (or even cherry-pick) a commit elsewhere without also
picking up an unwanted submodule update.
Jens suggests never committing submodule SHA1s. This makes it difficult to
restore the submodules to the state they were in when a super-repo commit was
made. To me this is unacceptable -- if commits don't encompass the entire
state of the repo (including its submodules) then they're pretty much
useless. Well, maybe commits themselves don't need to do that, but I sure
need some way to restore the entire state of the repo.
I'm not sure there's a good or easy answer here. I suspect that it should
always be up to the user whether or not submodule changes are included in a
commit. The way git currently works, that means that a floating checkout
would always have a modified status when in fact it isn't really dirty but
merely smudged.
Wish I could propose a solution, but all I have are questions!
M.
prev parent reply other threads:[~2011-12-14 15:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 0:55 Auto update submodules after merge and reset Max Krasnyansky
2011-11-30 8:31 ` Jens Lehmann
2011-12-06 1:06 ` Max Krasnyansky
2011-12-06 21:32 ` Jens Lehmann
2011-12-07 9:07 ` Andreas T.Auer
2011-12-07 22:23 ` Jens Lehmann
2011-12-08 9:13 ` andreas.t.auer_gtml_37453
2011-12-09 23:57 ` Phil Hord
2011-12-10 1:41 ` Andreas T.Auer
2011-12-11 14:43 ` Phil Hord
2011-12-11 21:15 ` Andreas T.Auer
2011-12-12 22:39 ` Jens Lehmann
2011-12-12 23:43 ` Phil Hord
2011-12-13 7:52 ` Jens Lehmann
2011-12-13 9:45 ` Andreas T.Auer
2011-12-13 21:44 ` Jens Lehmann
2011-12-13 23:05 ` Andreas T.Auer
2011-12-14 15:16 ` Marc Branchaud [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=4EE8BDD7.1080507@xiplink.com \
--to=marcnarc@xiplink.com \
--cc=Jens.Lehmann@web.de \
--cc=andreas.t.auer_gtml_37453@ursus.ath.cx \
--cc=git@vger.kernel.org \
--cc=phil.hord@gmail.com \
/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.