Skip to content

git clean is destructive and undocumented #62

@nojnhuh

Description

@nojnhuh

I have some gitignored local configuration I maintain locally in the same directory as a git repo. Running go-apidiff irrecoverably deletes all of those files because of the git clean it does here:

go-apidiff/pkg/diff/run.go

Lines 199 to 201 in 00f8d2e

if err := wt.Clean(&git.CleanOptions{Dir: true}); err != nil {
return nil, nil, err
}

This behavior is destructive and essentially impossible to know about until it's too late. This behavior should be documented and put behind a descriptive flag like --force-clean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions