git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What is in git.git
@ 2006-01-21  8:03 Junio C Hamano
       [not found] ` <200601211524.03096.lan@ac-sw.com>
  2006-01-21 10:36 ` Alexander Litvinov
  0 siblings, 2 replies; 14+ messages in thread
From: Junio C Hamano @ 2006-01-21  8:03 UTC (permalink / raw)
  To: git

The "bind commit" experiments for subproject support is coming
along rather nicely.  Near the tip of the "pu" branch, there
are:

 - read-tree --prefix;
 - write-tree --prefix and write-tree --exclude;
 - commit-tree --bind;
 - fsck-objects and convert-objects that understand "bind" lines
   in commit objects;
 - rev-list --objects that understand "bind" lines
   in commit objects;

I think the first four are more-or-less well debugged.

I am reasonably confident that I did not break rev-list for
repositories without "bind" commits, but I have no clue how
correct it is when dealing with commits with "bind" lines.  This
is the last major remaining piece of the puzzle, and the rest is
just the matter of scripting.  I'd be sending out a request for
help on the rev-list in a separate message.

There still is no barebone Porcelainish work done using these
changes.  The attached script demonstrates a superproject that
binds two subprojects with their own development histories.

-- >8 --
#!/bin/sh
rm -fr .git
git init-db
: >main
for i in 1 2
do
	echo "Version #$i of primary subproject" >main
	git add main
	git commit -a -m "`cat main`"
	git tag main-$i
done
git branch main
rm -f .git/refs/heads/master .git/index

mkdir dir
: >sub1
: >dir/sub2
for i in A B C
do
	echo "subproject sub1 ($i)" >sub1
	echo "subproject dir/sub2 ($i)" >dir/sub2
	git add sub1 dir/sub2
	git commit -a -m "subproject #$i"
	git tag subpro-$i
done
git branch subpro
rm -fr dir sub1 main
rm -f .git/refs/heads/master .git/index

git read-tree main-1
git read-tree --prefix=sub/ subpro-A
toptree=`git write-tree`
topcommit=$(echo "Initial top commit" |
git commit-tree $toptree \
	--bind `git rev-parse --verify main-1` / \
	--bind  `git rev-parse --verify subpro-A` sub/)
echo $topcommit >.git/refs/heads/master
git tag top-1A

git read-tree main-1
git read-tree --prefix=sub/ subpro-B
toptree=`git write-tree`
topcommit=$(echo "Second top commit" |
git commit-tree $toptree \
	-p `git rev-parse --verify top-1A` \
	--bind `git rev-parse --verify main-1` / \
	--bind  `git rev-parse --verify subpro-B` sub/)
echo $topcommit >.git/refs/heads/master
git tag top-1B

git read-tree main-2
git read-tree --prefix=sub/ subpro-C
toptree=`git write-tree`
topcommit=$(echo "Third top commit" |
git commit-tree $toptree \
	-p `git rev-parse --verify top-1B` \
	--bind `git rev-parse --verify main-2` / \
	--bind  `git rev-parse --verify subpro-C` sub/)
echo $topcommit >.git/refs/heads/master
git tag top-2C

git log

git rev-list --objects top-1A..top-2C |
git name-rev --tags --stdin

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-01-24  1:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-21  8:03 What is in git.git Junio C Hamano
     [not found] ` <200601211524.03096.lan@ac-sw.com>
2006-01-21 10:33   ` Alexander Litvinov
2006-01-21 10:36 ` Alexander Litvinov
2006-01-21 19:37   ` Junio C Hamano
2006-01-21 22:22     ` Junio C Hamano
2006-01-21 23:33     ` Josef Weidendorfer
2006-01-22  2:44       ` Junio C Hamano
2006-01-24  1:52         ` Josef Weidendorfer
2006-01-22  3:12       ` Petr Baudis
2006-01-22 17:53       ` Daniel Barkalow
2006-01-22 20:08         ` Junio C Hamano
2006-01-22 20:26           ` Daniel Barkalow
2006-01-22 20:35             ` Junio C Hamano
2006-01-22 20:41       ` Junio C Hamano

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).