diff options
author | Eric Wong <e@80x24.org> | 2019-01-19 06:36:04 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-01-20 04:24:54 +0000 |
commit | 4cefd2b05e5262f31505c7226ce761cbd4b1f308 (patch) | |
tree | b39660a26bdcf86748b6fcb922b065b2f33502a3 /lib/PublicInbox/Git.pm | |
parent | 1ebd2f3f136a29e973a2919b100da6d5f6219d3d (diff) | |
download | public-inbox-4cefd2b05e5262f31505c7226ce761cbd4b1f308.tar.gz |
David Turner's patch to return "ambiguous" seems like a reasonable patch for future versions of git: https://public-inbox.org/git/672a6fb9e480becbfcb5df23ae37193784811b6b.camel@novalis.org/
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r-- | lib/PublicInbox/Git.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index b655921b..a0b934a3 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -179,11 +179,13 @@ sub check { local $/ = "\n"; chomp(my $line = $self->{in_c}->getline); my ($hex, $type, $size) = split(' ', $line); - return if $type eq 'missing'; - # "dead" in git.git shows "dangling 4\ndead\n", not sure why - # https://public-inbox.org/git/20190118033845.s2vlrb3wd3m2jfzu@dcvr/ - # so handle the oddball stuff just in case + # Future versions of git.git may show 'ambiguous', but for now, + # we must handle 'dangling' below (and maybe some other oddball + # stuff): + # https://public-inbox.org/git/20190118033845.s2vlrb3wd3m2jfzu@dcvr/T/ + return if $type eq 'missing' || $type eq 'ambiguous'; + if ($hex eq 'dangling' || $hex eq 'notdir' || $hex eq 'loop') { $size = $type + length("\n"); my $r = read($self->{in_c}, my $buf, $size); |