From e38f77d844867620d08d334ca46f1d9d2594bdc0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 15 Jan 2017 18:36:47 +0000 Subject: [PATCH] dgit: import_dsc: Break out import_dsc_result No functional change other than slight change to messages. Signed-off-by: Ian Jackson --- dgit | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/dgit b/dgit index fbf844e0..dbfe1ac3 100755 --- a/dgit +++ b/dgit @@ -6049,6 +6049,13 @@ sub cmd_quilt_fixup { build_maybe_quilt_fixup(); } +sub import_dsc_result { + my ($dstref, $newhash, $what_log, $what_msg) = @_; + my @cmd = (@git, qw(update-ref -m), $what_log, $dstref, $newhash); + runcmd @cmd; + progress "dgit: import-dsc: $what_msg"; +} + sub cmd_import_dsc { my $needsig = 0; @@ -6145,10 +6152,9 @@ END fail "Not fast forward to $dsc_hash"; } } - @cmd = (@git, qw(update-ref -m), "dgit import-dsc (Dgit): $info", - $dstbranch, $dsc_hash); - runcmd @cmd; - progress "dgit: import-dsc updated git ref $dstbranch"; + import_dsc_result $dstbranch, $dsc_hash, + "dgit import-dsc (Dgit): $info", + "updated git ref $dstbranch"; return 0; } @@ -6208,10 +6214,9 @@ END } } - my @cmd = (@git, qw(update-ref -m), "dgit import-dsc: $info", - $dstbranch, $newhash); - runcmd @cmd; - progress "dgit: import-dsc results are in in git ref $dstbranch"; + import_dsc_result $dstbranch, $newhash, + "dgit import-dsc: $info", + "results are in in git ref $dstbranch"; } sub cmd_archive_api_query { -- 2.30.2