From: Petr Baudis <pasky@suse.cz>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Junio C Hamano <junkio@cox.net>,
Josef Weidendorfer <Josef.Weidendorfer@gmx.de>,
git@vger.kernel.org
Subject: Re: RFC: Subprojects
Date: Mon, 23 Jan 2006 02:22:27 +0100 [thread overview]
Message-ID: <20060123012227.GW28365@pasky.or.cz> (raw)
In-Reply-To: <Pine.LNX.4.64.0601181214150.25300@iabervon.org>
Dear diary, on Wed, Jan 18, 2006 at 07:21:59PM CET, I got a letter
where Daniel Barkalow <barkalow@iabervon.org> said that...
> Okay, so you're using additional branch heads in the superproject to track
> the current state of the subprojects. That makes sense, although I think
> it would confuse people less if they were held separately. IIRC,
> refs/subprojects/kernel/heads/master is a perfectly good ref name these
> days, so that might be a good idea. That would also mean that
> refs/tags/v2.6.14 and refs/tags/v2.7.2.3 wouldn't get confused (being
> linux and gcc tags, respectively), because they'd be under the appropriate
> subprojects.
I passionately agree - this is the only thing I do not like on the
current Junio's proposal (besides that top-level subproject confusion).
The way it is proposed, you are mixing different projects in a single
refs namespace and I think that's *really* confusing.
Besides, you are going to get a lot of complications since to do merging
properly you need two heads per subproject (its 'master' and 'origin'
heads; and it's useful to have e.g. all the upstream heads called
'origin' since then you can say cg-fetch -r origin in the superproject
and have all the subproject origins fetched as well) and you might want
to have other subproject heads as well. Now, for different superproject
heads, you want separate set of subproject heads. You can see the
downward spiral from here, I guess... And multiply all that by two since
you also have tags.
It actually took me a short while to realize that keeping separate
subproject/.git/refs makes no sense precisely because for different
superproject heads, you want a different set of subproject refs.
So in line with Daniel's proposal, I'd propose:
refs/subprojects/<superhead>/<subid>/heads/master
<superhead> is the name of the current HEAD (${#refs/heads/}). <subid>
is a little more tricky - this should be the part after the equal sign
in .git/mtab (or .git/binds or .git/subprojects or whichever is the name
of the day). Obviously, you can just figure out something, but I'd like
to assign this automagically.
OTOH, in Cogito I might as well just default to sha1 of something random
(e.g. the path+commitid+time()) since I do not expect this to be
normally referenced by a human; I just intend to switch from refs/ to
refs/subprojects/<superhead>/<subid>/ when dealing with the subproject
exclusively. ($GIT_REF_DIR (by default $GIT_DIR/refs) would come useful;
I'll probably whip up a patch when I get to finally need it.)
> I hope people will want to prepare their commits to the kernel subproject
> as would be suitable for pushing to Linus, which would suggest that they'd
> tend to do a commit in the kernel subproject embedded in their
> superproject separately from doing the commit in the superproject, and
> so the branch head would match the index but not the bind line when they
> got to committing the superproject.
FWIW, my idea is that it should be "a seamless experience for the user"
(tm) to do development in a subproject of another project, and I can see
no reason why should that be hard to do in any way.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Of the 3 great composers Mozart tells us what it's like to be human,
Beethoven tells us what it's like to be Beethoven and Bach tells us
what it's like to be the universe. -- Douglas Adams
next prev parent reply other threads:[~2006-01-23 1:20 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-11 15:58 RFC: Subprojects Simon Richter
2006-01-11 16:44 ` Johannes Schindelin
2006-01-11 16:52 ` Simon Richter
2006-01-11 17:42 ` Linus Torvalds
2006-01-11 19:43 ` Simon Richter
2006-01-11 20:06 ` Linus Torvalds
2006-01-14 8:59 ` Junio C Hamano
2006-01-14 19:16 ` Linus Torvalds
2006-01-14 19:32 ` A Large Angry SCM
2006-01-14 20:02 ` Linus Torvalds
2006-01-14 20:30 ` A Large Angry SCM
2006-01-14 20:38 ` Junio C Hamano
2006-01-15 0:28 ` Martin Langhoff
2006-01-15 0:49 ` Junio C Hamano
2006-01-15 1:55 ` Tom Prince
2006-01-16 5:06 ` Daniel Barkalow
2006-01-16 19:08 ` A Large Angry SCM
2006-01-16 20:20 ` Daniel Barkalow
2006-01-16 22:25 ` A Large Angry SCM
2006-01-16 7:48 ` Alex Riesen
2006-01-14 20:16 ` Junio C Hamano
2006-01-15 1:01 ` Junio C Hamano
2006-01-16 10:44 ` Josef Weidendorfer
2006-01-16 20:49 ` Junio C Hamano
2006-01-17 5:46 ` Daniel Barkalow
2006-01-17 6:18 ` Junio C Hamano
2006-01-17 14:09 ` Petr Baudis
2006-01-17 16:45 ` Daniel Barkalow
2006-01-17 17:33 ` Craig Schlenter
2006-01-17 17:38 ` Linus Torvalds
2006-01-17 17:41 ` Daniel Barkalow
2006-01-18 1:41 ` Junio C Hamano
2006-01-18 3:49 ` Junio C Hamano
2006-01-18 11:47 ` Alexander Litvinov
2006-01-18 13:29 ` Andreas Ericsson
2006-01-18 17:06 ` Junio C Hamano
2006-01-18 18:21 ` Daniel Barkalow
2006-01-18 18:49 ` Junio C Hamano
2006-01-18 19:29 ` Daniel Barkalow
2006-01-23 1:22 ` Petr Baudis [this message]
2006-01-23 0:50 ` Petr Baudis
2006-01-16 7:28 ` Alexander Litvinov
2006-01-16 10:16 ` Andreas Ericsson
2006-02-20 13:16 ` Uwe Zeisberger
2006-02-21 7:57 ` Junio C Hamano
2006-01-12 3:19 ` Alexander Litvinov
2006-01-12 4:46 ` Martin Langhoff
2006-01-12 5:25 ` Alexander Litvinov
2006-01-12 5:39 ` Martin Langhoff
2006-01-12 8:36 ` Alexander Litvinov
2006-01-12 8:58 ` Alex Riesen
2006-01-12 7:20 ` Anand Kumria
2006-01-12 13:38 ` Daniel Barkalow
2006-01-15 15:07 ` [RFC][PATCH] Cogito support for simple subprojects Petr Baudis
2006-01-15 17:38 ` Linus Torvalds
2006-01-15 19:15 ` Junio C Hamano
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=20060123012227.GW28365@pasky.or.cz \
--to=pasky@suse.cz \
--cc=Josef.Weidendorfer@gmx.de \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.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).