[ccan] could you put the license on the download page?

Rusty Russell rusty at rustcorp.com.au
Mon Oct 25 11:59:46 EST 2010


On Fri, 22 Oct 2010 11:19:30 am you wrote:
> On Wed, Oct 20, 2010 at 11:35 PM, Rusty Russell <rusty at rustcorp.com.au> wrote:
> > I'll be switching to git (more people know it), with separate trees for
> > each module (which allows me to grant commit access on a module granularity)
> > and a merged tree for wider consumption.  But it makes it far easier to
> > browse the history of a module.
> >
> > Currently I'm playing with git subtree, which seems like it will be the most
> > effective way of doing this (though I'm not sure how it will scale with
> > hundreds of subtrees).
> 
> I wrote git-subtree, and to be honest, I'm not sure how well it will
> scale with that many subtrees either :(

OK, dumb git subtree question.

I've split and created my tree; what's the workflow for someone who wants
to modify a module?

They really want to do their work in the full tree (which contains the
tools and any other modules they need), so I think it makes sense for
them to do (assuming they're hacking on module foo, which is in ccan/foo
and has branch name module-foo):

	# Fresh working branch...
	git checkout -b my-mods master
	# hack hack hack
	git commit -a -m "improve foobar"
	git commit -a -m "improve foobar more"
	# put those into the module-foo branch
	git subtree split -P ccan/foo -b module-foo --annotate "foo: " master
	# Throw away commits from this tree.
	git reset --hard master

The reset seems tacky and a bit dangerous.  It'd be nice if subtree split had
a --discard which removed hunks and removed entire commits if they were empty.

In fact, that would be really nice for splitting the project into subtrees
in the first place...

Or am I missing something?

Cheers,
Rusty.


More information about the ccan mailing list