about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Import.pm')
-rw-r--r--lib/PublicInbox/Import.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index af35905b..ae508cd8 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -468,9 +468,9 @@ sub done {
         waitpid($pid, 0) == $pid or die 'fast-import did not finish';
         $? == 0 or die "fast-import failed: $?";
 
-        _update_git_info($self, 1) if delete $self->{nchg};
-
-        $self->lock_release;
+        my $nchg = delete $self->{nchg};
+        _update_git_info($self, 1) if $nchg;
+        $self->lock_release(!!$nchg);
 
         $self->{git}->cleanup;
 }