Skip to content

Commit 2af7da9

Browse files
author
Eric Wong
committed
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>
1 parent 19e9542 commit 2af7da9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

perl/Git/SVN.pm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,12 @@ sub resolve_local_globs {
9797
"existing: $existing\n",
9898
" globbed: $refname\n";
9999
}
100-
my $u = (::cmt_metadata("$refname"))[0] or die
101-
"$refname: no associated commit metadata\n";
100+
my $u = (::cmt_metadata("$refname"))[0];
101+
if (!defined($u)) {
102+
warn
103+
"W: $refname: no associated commit metadata from SVN, skipping\n";
104+
next;
105+
}
102106
$u =~ s!^\Q$url\E(/|$)!! or die
103107
"$refname: '$url' not found in '$u'\n";
104108
if ($pathname ne $u) {

0 commit comments

Comments
 (0)