diff --git a/pkg/bootstrap/git/gogit/gogit.go b/pkg/bootstrap/git/gogit/gogit.go index 1a22907b..916d7d87 100644 --- a/pkg/bootstrap/git/gogit/gogit.go +++ b/pkg/bootstrap/git/gogit/gogit.go @@ -172,7 +172,13 @@ func (g *GoGit) Commit(message git.Commit, opts ...git.Option) (string, error) { // modified. There's no circumstance in which we want to commit a // change to a broken symlink: so, detect and skip those. var changed bool - for file, _ := range status { + for file, fileStatus := range status { + if fileStatus.Staging == gogit.Deleted { + _, _ = wt.Add(file) + changed = true + continue + } + abspath := filepath.Join(g.path, file) info, err := os.Lstat(abspath) if err != nil {