chiark / gitweb /
dgit: fetch: Rename fetch_one from fetch (nfc)
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 1559a023928b4533017a232011889bf877084852..5802a2126e51b25ec45f726a9c4498d5fe3ffcc5 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3557,7 +3557,7 @@ sub fork_for_multisuite ($) {
        my $csubsuite = multisuite_suite_child($tsuite, \@mergeinputs,
                                               sub {
             @end = ();
-            fetch();
+            fetch_one();
            finish 0;
        });
        # xxx collecte the ref here
@@ -3715,7 +3715,7 @@ sub clone ($) {
     clone_finish($dstdir);
 }
 
-sub fetch () {
+sub fetch_one () {
     canonicalise_suite();
     if (check_for_git()) {
        git_fetch_us();
@@ -3740,7 +3740,7 @@ END
 
 sub pull () {
     my $multi_fetched = fork_for_multisuite(sub { });
-    fetch() unless $multi_fetched; # parent
+    fetch_one() unless $multi_fetched; # parent
     return if $multi_fetched eq '0'; # child
     runcmd_ordryrun_local @git, qw(merge -m),"Merge from $csuite [dgit]",
         lrref();
@@ -4597,11 +4597,15 @@ sub branchsuite () {
     }
 }
 
-sub fetchpullargs () {
+sub package_from_d_control () {
     if (!defined $package) {
        my $sourcep = parsecontrol('debian/control','debian/control');
        $package = getfield $sourcep, 'Source';
     }
+}
+
+sub fetchpullargs () {
+    package_from_d_control();
     if (@ARGV==0) {
        $isuite = branchsuite();
        if (!$isuite) {
@@ -4622,7 +4626,7 @@ sub cmd_fetch {
     fetchpullargs();
     my $multi_fetched = fork_for_multisuite(sub { });
     finish 0 if $multi_fetched;
-    fetch();
+    fetch_one();
 }
 
 sub cmd_pull {
@@ -4654,11 +4658,10 @@ sub cmd_update_vcs_git () {
        }
     }
 
-    my $sourcep = parsecontrol 'debian/control', 'debian/control';
-    $package = getfield $sourcep, 'Source';
+    package_from_d_control();
     my $ctrl;
     if ($specsuite eq '.') {
-       $ctrl = $sourcep;
+       $ctrl = parsecontrol 'debian/control', 'debian/control';
     } else {
        $isuite = $specsuite;
        get_archive_dsc();
@@ -5400,7 +5403,8 @@ sub quiltify ($$$$) {
                print STDERR "$us:  ", $reportnot->($notp), "\n";
            }
            print STDERR "$us: $_\n" foreach @$failsuggestion;
-           fail "quilt fixup naive history linearisation failed.\n".
+           fail
+ "quilt history linearisation failed.  Search \`quilt fixup' in dgit(7).\n".
  "Use dpkg-source --commit by hand; or, --quilt=smash for one ugly patch";
        } elsif ($quilt_mode eq 'smash') {
        } elsif ($quilt_mode eq 'auto') {