Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-svn: warn instead of dying when commit data is missing
author
Eric Wong
<e@80x24.org>
Sat, 2 Jul 2016 10:33:18 +0000
(10:33 +0000)
committer
Eric Wong
<e@80x24.org>
Sat, 9 Jul 2016 22:53:54 +0000
(22:53 +0000)
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>
perl/Git/SVN.pm
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
19e9542
)
diff --git
a/perl/Git/SVN.pm
b/perl/Git/SVN.pm
index bee1e7d1cba38242cb7f457011a96cd3d02a6653..018beb85a09d6ef524c326c3ec947982c05bf556 100644
(file)
--- a/
perl/Git/SVN.pm
+++ b/
perl/Git/SVN.pm
@@
-97,8
+97,12
@@
sub resolve_local_globs {
"existing: $existing\n",
" globbed: $refname\n";
}
"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) {
$u =~ s!^\Q$url\E(/|$)!! or die
"$refname: '$url' not found in '$u'\n";
if ($pathname ne $u) {