This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=f241d067a5b9ccba6fc947eb2127de1c37f5c485

commit f241d067a5b9ccba6fc947eb2127de1c37f5c485
Author: Guillem Jover <[email protected]>
AuthorDate: Wed Dec 28 01:10:57 2022 +0100

    dpkg-mergechangelogs: Refactor merge_tail() sub from anonymous sub
    
    Changelog: internal
---
 scripts/dpkg-mergechangelogs.pl | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/scripts/dpkg-mergechangelogs.pl b/scripts/dpkg-mergechangelogs.pl
index 5c7501492..f6d7879ae 100755
--- a/scripts/dpkg-mergechangelogs.pl
+++ b/scripts/dpkg-mergechangelogs.pl
@@ -116,13 +116,14 @@ my @b = reverse @$chb;
 my @result; # Lines to output
 my $exitcode = 0; # 1 if conflict encountered
 
-unless (merge_block($cho, $cha, $chb, sub {
-                       my $changes = shift;
-                       my $tail = $changes->get_unparsed_tail();
-                       chomp $tail if defined $tail;
-                       return $tail;
-                   }))
-{
+sub merge_tail {
+    my $changes = shift;
+    my $tail = $changes->get_unparsed_tail();
+    chomp $tail if defined $tail;
+    return $tail;
+};
+
+unless (merge_block($cho, $cha, $chb, \&merge_tail)) {
     merge_conflict($cha->get_unparsed_tail(), $chb->get_unparsed_tail());
 }
 

-- 
Dpkg.Org's dpkg

Reply via email to