chiark / gitweb /
dgit: Do not nedlessly re-fetch the rewrite map.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Jan 2017 17:42:40 +0000 (17:42 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Jan 2017 17:42:44 +0000 (17:42 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index 095e977..8fa1f15 100644 (file)
@@ -1,6 +1,7 @@
 dgit (3.1~) unstable; urgency=medium
 
-  * 
+  Bugfixes:
+  * dgit: Do not nedlessly re-fetch the rewrite map.
 
  --
 
diff --git a/dgit b/dgit
index 824e9d1..d3673c2 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2843,8 +2843,10 @@ END
     };
 
     if (parse_cfg_bool 'rewrite-map-enable', 'true', $rewrite_enable) {
-       my $lrf = $do_fetch->("rewrite map", $rewritemap) or return;
-       $mapref = $lrf.'/'.$rewritemap;
+       if (!defined $mapref) {
+           my $lrf = $do_fetch->("rewrite map", $rewritemap) or return;
+           $mapref = $lrf.'/'.$rewritemap;
+       }
        my $rewritemapdata = git_cat_file $mapref.':map';
        if (defined $rewritemapdata
            && $rewritemapdata =~ m/^$dsc_hash(?:[ \t](\w+))/m) {