gitconvex icon indicating copy to clipboard operation
gitconvex copied to clipboard

Stage all and commit automatically.

Open Nageswari-droid opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like If the client click on commit changes before staging operation then all the files will be staged automatically.

Describe alternatives you've considered Not applicable

Additional context None

Nageswari-droid avatar Jan 02 '21 15:01 Nageswari-droid

Suggestion

This feature does not require a separate API to carry out the operation. From the UI, the component for committing the changes can be redesigned to call the "stage all" api and on successful response, the "commit changes" api can be invoked with a proper commit message.

neel1996 avatar Jan 30 '21 03:01 neel1996

How can I proceed?

If a user clicks on "Commit changes" button before staging, instead of displaying "No Staged files to commit" it should list all the untracked/modified/deleted files with a proceed button like "Stage all and commit". Am I right about it or how you are expecting?

Nageswari-droid avatar Jan 30 '21 10:01 Nageswari-droid

@Nageswari-droid Currently, when "Commit changes" is clicked, it will not let the user do it when there are no staged files available. As part of this feature, that condition needs to be changed to check for all the worktree changes and let the user "Stage all the changes and commit it" in a single click

The gitChanges query returns the worktree changes from the target repo.

gitChanges(repoId: String!) {
    gitUntrackedFiles: [String]!
    gitChangedFiles: [String]!
}

If the arrays are empty then appropriate warning should be thrown, or else the commit should be allowed after staging all the changes.

neel1996 avatar Jan 30 '21 11:01 neel1996