summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rwxr-xr-xinfra/dgit-repos-policy-debian4
2 files changed, 6 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index b525dad..b58479c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
dgit (2.12~) unstable; urgency=medium
- *
+ * Fix dgit-repos-policy-debian which broke due to recent git setting
+ GIT_ALTERNATE_OBJECT_DIRECTORIES in the pre-receive-hook.
--
diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian
index 48a42d9..cff5d06 100755
--- a/infra/dgit-repos-policy-debian
+++ b/infra/dgit-repos-policy-debian
@@ -355,6 +355,10 @@ END
my $checkpid = open CHKOUT, "-|" // die $!;
if (!$checkpid) {
open STDIN, "<&", $chkinput or die $!;
+ delete $ENV{GIT_ALTERNATE_OBJECT_DIRECTORIES};
+ # ^ recent versions of git set this in the environment of
+ # receive hooks. This can cause us to see things which
+ # the user is trying to abolish.
exec @objscatcmd or die $!;
}