@matheusbsbs / matheus-bagliano / commits / b50be1d80f
Fork 0

cvsserver: Fix for work trees

git-cvsserver used checkout-index internally for commit and annotate. Since a work tree is required for this to function now, this was breaking. Work around this by defining GIT_WORK_TREE=. in the appropriate places. Signed-off-by: Brian Downing <bdowning@lavos.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brian Downing committed Aug 8, 2007 at 23:26 UTC b50be1d80f4c151447d2ac96eaeb1c4d76ed4ef5
1 file changed +2
git-cvsserver.perl
+2
@@ -1196,6 +1196,7 @@ sub req_ci
1196 $log->info("Lockless commit start, basing commit on '$tmpdir', index file is '$file_index'");
1197
1198 $ENV{GIT_DIR} = $state->{CVSROOT} . "/";
1199 + $ENV{GIT_WORK_TREE} = ".";
1200 $ENV{GIT_INDEX_FILE} = $file_index;
1201
1202 # Remember where the head was at the beginning.
@@ -1721,6 +1722,7 @@ sub req_annotate
1722 $log->info("Temp checkoutdir creation successful, basing annotate session work on '$tmpdir', index file is '$file_index'");
1723
1724 $ENV{GIT_DIR} = $state->{CVSROOT} . "/";
1725 + $ENV{GIT_WORK_TREE} = ".";
1726 $ENV{GIT_INDEX_FILE} = $file_index;
1727
1728 chdir $tmpdir;