chrisgrieser / nvim-tinygit

A lightweight bundle of commands focussed on swift and streamlined git operations.
MIT License
154 stars 4 forks source link

Feature Request: Opt-out of "stage all if nothing staged" behavior #18

Closed alex35mil closed 49 minutes ago

alex35mil commented 2 hours ago

Feature Requested

In amend functions, I think I would prefer to opt-out of "stage all if nothing staged". So it would be great to have an option to do so.

Relevant Screenshot

No response

Checklist

chrisgrieser commented 2 hours ago

I am not sure I follow how that would be useful?

alex35mil commented 1 hour ago

The use-case I just faced is that I thought I staged some changes that I hadn't and with forcePushIfDiverged = true I accidentally staged all, amended, and pushed everything.

I would prefer to cancel the operation with a warning that nothing is staged in this case.

chrisgrieser commented 49 minutes ago

I see, as a safety net, that makes sense.

Added stageAllIfNothingStaged options for amendNoEdit.