jesseduffield / jesseduffield/lazygit

Change promptToStageAllAndRetry to run "git add -u"

Open
#1,641 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Is your feature request related to a problem? Please describe.**
When prompted with "You have not staged any files. Commit all files?" (promptToStageAllAndRetry), i expect the same behavior as "git commit -a", but instead it calls StageAll (git add -A).
Whereas "git commit -a" only stage files that have been modified and deleted, but not new files. Similar to "git add -u".

**Describe the solution you'd like**
Add another function like StageUpdated (git add -u), and keep using StageAll for other functions like handleStageAll where the behavior makes sense.

**Describe alternatives you've considered**
The StageAll function could maybe run "git add -u" all the time. But this again could be considered unwanted behavior by many.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.