summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rwxr-xr-xdgit-badcommit-fixup14
2 files changed, 16 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index cd44b40..729985c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ dgit (3.11~) unstable; urgency=medium
* dgit: honour more pre-tree git config options in our private
trees sharing the user's object store. In particular,
core.sharedRepository. Prompted by #867603.
+ * dgit-badcommit-fixup: Honour core.sharedRepository.
+ Closes:#867603.
* infrastructure: Cope with new git-receive-pack which has
quarantine feature: ie, work around #867702.
* test suite: Cope with git restricting ext:: protocols.
diff --git a/dgit-badcommit-fixup b/dgit-badcommit-fixup
index 8b202c0..3995ceb 100755
--- a/dgit-badcommit-fixup
+++ b/dgit-badcommit-fixup
@@ -59,6 +59,17 @@ my $bare = `git rev-parse --is-bare-repository`;
die "$? $!" if $?;
chomp $bare or die;
+our @configs;
+foreach my $k (qw(core.sharedRepository)) {
+ $?=0; $!=0; my $v = `set -x; git config --local $k`;
+ if (defined $v && $?==0 && chomp $v) {
+ push @configs, [ $k, $v ];
+ } elsif (defined $v && $?==256 && $v eq '') {
+ } else {
+ die "git-config --local $k => $v $? $! ?";
+ }
+}
+
sub getobj ($$) {
my ($obj, $type) = @_;
print GCFI $obj, "\n" or die $!;
@@ -163,6 +174,9 @@ sub edit_rewrite_map ($) {
runcmd qw(git config gc.auto 0);
runcmd qw(rm -rf .git/objects);
symlink "../../objects", ".git/objects" or die $!;
+ foreach my $c (@configs) {
+ runcmd qw(git config), $c->[0], $c->[1];
+ }
my %map;