aboutsummaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-02 10:33:18 +0000
committerEric Wong <e@80x24.org>2016-07-09 22:53:54 +0000
commit2af7da9f8fb68337030630d88c19db512189babc (patch)
tree7b022efb4347f114a0de586bb1d54b754a8e6499 /perl
parent19e9542fa29ec3027a5169ac5d1fc740405dc234 (diff)
downloadgit-2af7da9f8fb68337030630d88c19db512189babc.tar.gz
git-2af7da9f8fb68337030630d88c19db512189babc.tar.xz
git-svn: warn instead of dying when commit data is missing
It is possible to have refs globbed by git-svn which stores data purely in git; gently skip those instead of dying and assuming user error. ref: http://mid.gmane.org/CALi1mtdtNF_GtzyPTbfb7N51wwxsFY7zm8hsgwxr3tHcZZboyg@mail.gmail.com Suggested-by: Jacob Godserv <jacobgodserv@gmail.com> Cc: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'perl')
-rw-r--r--perl/Git/SVN.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index bee1e7d1c..018beb85a 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -97,8 +97,12 @@ sub resolve_local_globs {
"existing: $existing\n",
" globbed: $refname\n";
}
- my $u = (::cmt_metadata("$refname"))[0] or die
- "$refname: no associated commit metadata\n";
+ my $u = (::cmt_metadata("$refname"))[0];
+ if (!defined($u)) {
+ warn
+"W: $refname: no associated commit metadata from SVN, skipping\n";
+ next;
+ }
$u =~ s!^\Q$url\E(/|$)!! or die
"$refname: '$url' not found in '$u'\n";
if ($pathname ne $u) {