From: Greg Price Date: Sun, 1 Feb 2009 07:27:11 +0000 (-0500) Subject: import-trac: commit inside a doc/ directory (thanks to geofft again) X-Git-Url: https://sipb.mit.edu/gitweb.cgi/sipb-www.git/commitdiff_plain/6fb29f0f0d7fd9b08e0ec476f55a03f40088b38d import-trac: commit inside a doc/ directory (thanks to geofft again) --- diff --git a/import-trac b/import-trac index f82f341..b86a535 100755 --- a/import-trac +++ b/import-trac @@ -34,12 +34,18 @@ foreach $row (@$rows) { waitpid $pid, 0; $pid = open2(OUT, IN, qw(git mktree)); - print IN `git ls-tree $head | grep -v $row->{name}` if $head; + print IN `git ls-tree $head:doc | grep -v $row->{name}` if $head; print IN "100644 blob $blob\t$row->{name}\n"; close(IN); chomp($tree = ); waitpid $pid, 0; + $pid = open2(OUT, IN, qw(git mktree)); + print IN "040000 tree $tree\tdoc\n"; + close(IN); + chomp($tree = ); + waitpid $pid, 0; + $name = $authors{$row->{author}}; $ENV{GIT_AUTHOR_NAME} = "$name";