Re: [git patches] 2.6.x net driver updates

From: Linus Torvalds
Date: Sat Jun 18 2005 - 15:24:21 EST




On Sat, 18 Jun 2005, Jeff Garzik wrote:
>
> I re-did the merge locally, as a test, finalizing with 'git commit'
> rather than 'git-commit-tree ...' and the parent info came out correct.
> FWIW.

Well, you can certainly do it by hand with git-commit-tree too, you just
need to make sure that you give all the relevant parents, ie something
like

git-commit-tree $(git-write-tree) -p HEAD -p MERGE_HEAD

will do the right thing too (and is what "git commit" ends up doing in the
end, of course).

In fact, the "git commit" script will _only_ handle the merge case of
having done a single "git pull", and if you do anything more complex that
has more than two parents, you'll have to go back to scripting the use of
git-commit-tree by hand.

I've considered trying to automate this a bit more: right now it really
does depend on people and scripts always getting the parents right, but at
least in theory I could embed the parent information in the "index" file
at least as an additional safety-measure.

However, I'm not entirely sure that is a good idea: the current approach
is _extremely_ flexible, exactly because it allows you to do anything you
want with parents. That flexibility can be nice, but it's obviously also
what makes it a bit dangerous.

So the git approach is "give them rope", with a few scripts that handle
the normal cases right. That's the unix way, after all..

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/