chiark / gitweb /
dgit: fetch: Slightly refactor pull()
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 Jul 2018 00:16:19 +0000 (01:16 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 Jul 2018 00:28:04 +0000 (01:28 +0100)
When for_for_multisuite returns '0', meaning we are a child and should
do one suite, use finish 0 rather than returning, after doing the
fetch.

This has no functional change because the one call site is at the end
of cmd_pull, after which we finish 0 anyway.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 5802a21..7242c78 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3741,7 +3741,7 @@ END
 sub pull () {
     my $multi_fetched = fork_for_multisuite(sub { });
     fetch_one() unless $multi_fetched; # parent
-    return if $multi_fetched eq '0'; # child
+    finish 0 if $multi_fetched eq '0'; # child
     runcmd_ordryrun_local @git, qw(merge -m),"Merge from $csuite [dgit]",
         lrref();
     printdone "fetched to ".lrref()." and merged into HEAD";