On Fri, Dec 01, 2006 at 06:33:12PM +0100, Stephan Feder wrote:
Correct.
=20
t=20
=20
=20
=20
Let's see if I understand you correctly:
You don't want to create an additional .git directory for the submodule
and just handle everything with one toplevel .git repository for the
whole project.
Without the .git directory, you of course do not have refs/heads inside
the submodule.
So this is a different user-interface approach to submodules when
compared to my approach. But the basis is the same and both could
inter-operate.
Now your submodule is no longer seen as an independent git repository
and I think this would cause problems when you want to push/pull between
the submodule and its upstream repository.
No technical problems, but UI-problems because now your submodule is
handled completly different to a "normal" repository.
=20
But you could still call the "xdiff" part of the git repository a
submodule. And then changes to the xdiff directory result in a new
submodule commit, even when there is no direct reference to it.
So you'd still "commit to the xdiff submodule".
git-cat-file commit HEAD:xdiff already works out of the box (even
cat-file tree to get the submodule tree). But up to now revision
parsing follows the file name only once.
What about just separating things with "/"?
commit HEAD
tree HEAD/
blob HEAD/Makefile
commit HEAD/xdiff
tree HEAD/xdiff/
blob HEAD/xdiff~2/xemit.c
this may add some confusion when used with hierarchical branches, but
it's still unique:
refs/heads/master/xdiff/xemit.c
Just use as many path components until a matching reference is found,
then start peeling.
Or just use / between super and submodule:
refs/heads/master:xdiff/xemit.c
I think this is easier to read then
refs/heads/master:xdiff//:xemit.c
Because it helps "normal" git operations ;-)
--=20
Martin Waitz