git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cvsserver: Fix for work trees
@ 2007-08-09  4:26 Brian Downing
  2007-08-09  5:45 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Downing @ 2007-08-09  4:26 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Martin Langhoff, Brian Downing

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>
---
 git-cvsserver.perl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index ae7d511..13dbd27 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;
-- 
1.5.3.GIT

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

end of thread, other threads:[~2007-08-09  8:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-09  4:26 [PATCH] cvsserver: Fix for work trees Brian Downing
2007-08-09  5:45 ` Junio C Hamano
2007-08-09  8:45   ` Johannes Schindelin

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