diff --git a/git/git.go b/git/git.go index 10d21531..4db210e0 100644 --- a/git/git.go +++ b/git/git.go @@ -1114,9 +1114,8 @@ func IsFileModified(filepath string) (bool, error) { if err := cmd.Start(); err != nil { return false, lfserrors.Wrap(err, "Failed to start git status") } - scanner := bufio.NewScanner(outp) matched := false - for scanner.Scan() { + for scanner := bufio.NewScanner(outp); scanner.Scan(); { line := scanner.Text() // Porcelain format is " " // Where = index status, = working copy status