From: Junio C Hamano <gitster@pobox.com>
To: "Hedges Alexander" <ahedges@student.ethz.ch>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Feature Request: Branch-Aware Submodules
Date: Thu, 25 Aug 2016 10:46:18 -0700 [thread overview]
Message-ID: <xmqqvayon3md.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <7B5AD16B-9729-453E-839C-2A2FDB07F8E9@student.ethz.ch> (Hedges Alexander's message of "Thu, 25 Aug 2016 09:00:47 +0000")
"Hedges Alexander" <ahedges@student.ethz.ch> writes:
> Right now updating a submodule in a topic branch and merging it into master
> will not change the submodule index in master leading to at least two commit
> for the same change (one in any active branch).
I stopped reading here because I am not getting this.
I guess I am confused because I do not understand what you mean by
"the submodule index in master". The concept of "index" does not
belong to each branch (or even a commit), so by "index" you are
trying to point at something else, but I cannot guess what it is.
You have a top-level superproject that has another project as its
submodule. The superproject has topic and master branches (or it
may only have master). The project that is used as its submodule
also has topic and master branches (it may have more). You do your
development in the submodule, e.g.
cd submoduledir
git checkout topic
hack hack hack
git commit
git checkout master
git merge topic
and merge the topic branch into its master when the topic is
polished enough.
And then? The 'master' in the submodule is good enough, so you'd
go back to the top-level superproject and bind that merged result
in its place? e.g.
cd ..
git add submoduledir
git commit -m "Updated submoduledir with the topic"
That is only one commit each in the superproject and the submodule
project.
next prev parent reply other threads:[~2016-08-25 17:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 9:00 Feature Request: Branch-Aware Submodules Hedges Alexander
2016-08-25 17:45 ` Stefan Beller
2016-08-25 20:50 ` Junio C Hamano
2016-08-25 20:55 ` Stefan Beller
2016-08-25 21:25 ` Junio C Hamano
2016-08-25 17:46 ` Junio C Hamano [this message]
[not found] <5EA7D232-5D41-4653-9E35-21C502C79C92@student.ethz.ch>
2016-08-26 15:12 ` Hedges Alexander
2016-08-29 2:17 ` Jacob Keller
2016-09-01 11:34 ` Hedges Alexander
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqvayon3md.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=ahedges@student.ethz.ch \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).