gitrs icon indicating copy to clipboard operation
gitrs copied to clipboard

Prompt before removal

Open mccurdyc opened this issue 2 years ago • 1 comments

@teto gave some great feedback in https://github.com/NixOS/nixpkgs/pull/238858#issuecomment-1600786398

I did have some thoughts on autoremoval

  • https://github.com/mccurdyc/gitrs/blob/eef037029b4667561efecfad59055e6d5504f4a6/src/fs.rs#L37
  • "sync --archive - archives repositories, to $GITRS_ROOT/.archived"

But I agree there is still a missing case where maybe instead of the specificity of the first point checking for uncommitted changes, you could set a --always-prompt-before-removal flag or the equivalent!

mccurdyc avatar Jun 21 '23 13:06 mccurdyc

I think the default should be non-destructive: that's the least surprising and less troublesome (if people use sync and get their repo removed, you can be sure they wont ever use gitrs again). I dunno if there is a config file but setting autoremoval could go there for advanced users.

teto avatar Jun 21 '23 13:06 teto