diff options
Diffstat (limited to 'plumbing')
-rw-r--r-- | plumbing/object/patch.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plumbing/object/patch.go b/plumbing/object/patch.go index a920631..aa96a96 100644 --- a/plumbing/object/patch.go +++ b/plumbing/object/patch.go @@ -271,6 +271,11 @@ func getFileStatsFromFilePatches(filePatches []fdiff.FilePatch) FileStats { var fileStats FileStats for _, fp := range filePatches { + // ignore empty patches (binary files, submodule refs updates) + if len(fp.Chunks()) == 0 { + continue + } + cs := FileStat{} from, to := fp.Files() if from == nil { |