summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Brian Downing <bdowning@lavos.net>2007-08-08 23:26:10 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-08-08 22:16:46 -0700
commitb50be1d80f4c151447d2ac96eaeb1c4d76ed4ef5 (patch)
treeb546e22a2f1ee1043a71db7d362bc95666929140
parentgit-p4: Fix git-p4 submit to include only changed files in the perforce submi... (diff)
downloadtgif-b50be1d80f4c151447d2ac96eaeb1c4d76ed4ef5.tar.xz
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>
-rwxr-xr-xgit-cvsserver.perl2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index ae7d511589..13dbd27a80 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -1196,6 +1196,7 @@ sub req_ci
$log->info("Lockless commit start, basing commit on '$tmpdir', index file is '$file_index'");
$ENV{GIT_DIR} = $state->{CVSROOT} . "/";
+ $ENV{GIT_WORK_TREE} = ".";
$ENV{GIT_INDEX_FILE} = $file_index;
# Remember where the head was at the beginning.
@@ -1721,6 +1722,7 @@ sub req_annotate
$log->info("Temp checkoutdir creation successful, basing annotate session work on '$tmpdir', index file is '$file_index'");
$ENV{GIT_DIR} = $state->{CVSROOT} . "/";
+ $ENV{GIT_WORK_TREE} = ".";
$ENV{GIT_INDEX_FILE} = $file_index;
chdir $tmpdir;