Open
Description
Repro:
repo := must(git.Init(memory.NewStorage(), memfs.New()))
w := must(repo.Worktree())
must(w.Filesystem.Create("/foo"))
must(w.Add("/foo")) // No error!
fmt.Println(must(w.Status()).String()) // "?? foo" -> /foo is untracked
I suspect the fix is to localize the Add() path before updating the index.