diff options
author | Filip Navara <filip.navara@gmail.com> | 2019-04-26 10:07:59 +0200 |
---|---|---|
committer | Filip Navara <filip.navara@gmail.com> | 2019-04-26 10:07:59 +0200 |
commit | 14c17dc6881fccf851c8bdffab15774faa3bce8b (patch) | |
tree | e4e567231fee000bf6a6424577c60ce907431a18 /plumbing/object/patch.go | |
parent | 34cb7a3aededd002881504dd729527628e923fc6 (diff) | |
parent | ca5d7bb1a790303d2ca245cb6225850bcf5d12a6 (diff) | |
download | go-git-14c17dc6881fccf851c8bdffab15774faa3bce8b.tar.gz |
Merge branch 'master' into commitgraph-obj
Diffstat (limited to 'plumbing/object/patch.go')
-rw-r--r-- | plumbing/object/patch.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plumbing/object/patch.go b/plumbing/object/patch.go index 068589e..1efd0b1 100644 --- a/plumbing/object/patch.go +++ b/plumbing/object/patch.go @@ -321,6 +321,10 @@ func getFileStatsFromFilePatches(filePatches []fdiff.FilePatch) FileStats { for _, chunk := range fp.Chunks() { s := chunk.Content() + if len(s) == 0 { + continue + } + switch chunk.Type() { case fdiff.Add: cs.Addition += strings.Count(s, "\n") |