Package: git-debrebase
Version: 8.5
Severity: normal
Tags: patch
User: debian-p...@lists.debian.org
Usertags: hh2019

Trying to convert a git-dpm repository [1] to use git-debrebase fails
for me with

  % git debrebase convert-from-dgit-view upstream-debian-5.30
  Use of uninitialized value $_[0] in sprintf at 
/usr/share/dgit/gdr/perl5/Debian/Dgit/I18n.pm line 26.
   at /usr/share/dgit/gdr/perl5/Debian/Dgit.pm line 145.
        Debian::Dgit::__ANON__("Use of uninitialized value \$_[0] in sprintf at 
/usr/share/dgi"...) called at /usr/share/dgit/gdr/perl5/Debian/Dgit/I18n.pm 
line 26
        Debian::Dgit::I18n::f_("%s, from command line", undef) called at 
/usr/bin/git-debrebase line 2735
        main::cmd_convert_from_dgit_view() called at /usr/bin/git-debrebase 
line 3054
 
The attached patch fixes this.

Thanks for your work on dgit / git-debrebase and greetings from the
Debian Perl sprint in Hamburg!

[1] https://salsa.debian.org/perl-team/interpreter/perl.git if it matters
-- 
Niko Tyni   nt...@debian.org
>From 9251b5d47e60ccd3f91345bd81cdc2d2dc787ae3 Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Sat, 8 Jun 2019 10:58:01 +0300
Subject: [PATCH] git-debrebase: fix convert-from-dgit-view argv handling

---
 git-debrebase | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-debrebase b/git-debrebase
index 71bf39d..291cfa9 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -2733,7 +2733,7 @@ sub cmd_convert_from_dgit_view () {
 	my $spec = shift @ARGV;
 	my $commit = git_rev_parse "$spec^{commit}";
 	push @upstreams, { Commit => $commit,
-			   Source => (f_ "%s, from command line", $ARGV[0]),
+			   Source => (f_ "%s, from command line", $spec),
 			   Only => 1,
 			 };
     }
-- 
2.20.1

Reply via email to