commands/smudge: teach 'delayedSmudge' only to transfer uncached files

This commit is contained in:
Taylor Blau 2017-08-20 18:23:08 +02:00
parent bc376b805a
commit c04745c351

@ -59,7 +59,7 @@ func delayedSmudge(s *git.FilterProcessScanner, to io.Writer, from io.Reader, q
} }
if !skip && filter.Allows(filename) { if !skip && filter.Allows(filename) {
if _, statErr := os.Stat(path); err == nil || !os.IsNotExist(statErr) { if _, statErr := os.Stat(path); statErr != nil {
q.Add(filename, path, ptr.Oid, ptr.Size) q.Add(filename, path, ptr.Oid, ptr.Size)
return 0, true, ptr, nil return 0, true, ptr, nil
} }