jasonmccreary / git-trim

MIT License
367 stars 10 forks source link

Suggestion : ask for confirmation when running the command without option? #12

Closed Kraymer closed 2 years ago

Kraymer commented 2 years ago

Just installed the tool and runned git trim to trigger the display of the usage but it executed the command. That was pretty dumb from my part.

Still, I'm wondering if it would be better to display a confirmation when using no option :

Are you sure you want to remove merged, pruned, untracked, and stale branches?

And the question could be skipped for use in script by using a --no-interactive flag or by giving the options -mpsu explicitely.

jasonmccreary commented 2 years ago

The dangerous options do prompt for confirmation. The default option for git trim is to remove "pruned" branches, which, relatively speaking, should not be that dangerous.