Skip to content

Commit

Permalink
plumbing: format/packfile, early return
Browse files Browse the repository at this point in the history
Co-authored-by: onee-only <[email protected]>
  • Loading branch information
edigaryev and onee-only committed Jul 21, 2024
1 parent fd40610 commit 3a3f96c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plumbing/format/packfile/delta_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ func (idx *deltaIndex) findMatch(src, tgt []byte, tgtOffset int) (srcOffset, l i
h := hashBlock(tgt, tgtOffset)
tIdx := h & idx.mask
eIdx := idx.table[tIdx]
if eIdx != 0 {
srcOffset = idx.entries[eIdx]
} else {
if eIdx == 0 {
return
}

srcOffset = idx.entries[eIdx]

l = matchLength(src, tgt, tgtOffset, srcOffset)

return
Expand Down

0 comments on commit 3a3f96c

Please sign in to comment.