Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teach git stash and git commit the -A option #231

Open
dscho opened this issue May 29, 2019 · 5 comments
Open

Teach git stash and git commit the -A option #231

dscho opened this issue May 29, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@dscho
Copy link
Member

dscho commented May 29, 2019

The git add -A command can be used to conveniently add all files, whether they are tracked or not yet tracked (excluding the ones ignored via .gitignore/.git/info/excludes).

This convenience would come in quite nicely in the stash/commit commands, too (in the latter case, many test cases could be simplified using this new option).

The git stash command already has the --include-untracked option that does this, but not the short-and-sweet short option -A. The git commit command does not have any equivalent (it has the --untracked-files option, but that is really just modifying the output of git status).

Sadly, we cannot add --all, too, as that is already used for something different in git stash: it includes the ignored files, too. Likewise, git commit --all commits all tracked files, and does not add the untracked files (unlike git add --all).

@dscho dscho added enhancement New feature or request good first issue Good for newcomers labels May 29, 2019
@johnlinp
Copy link

Since --include-untracked in git stash already has a short option -u, why do we want to add another short option -A?

@dscho
Copy link
Member Author

dscho commented Jun 14, 2019

Since --include-untracked in git stash already has a short option -u, why do we want to add another short option -A?

Maybe because it is confusing that the same mode has different short options for different commands? I mean, git add -u does something completely different than git stash -u?

@johnlinp
Copy link

I see. Are you suggesting that --include-untracked in git stash should have 2 short options, -u and -A? Does any other long option has 2 short options in git?

@dscho
Copy link
Member Author

dscho commented Jun 17, 2019

Are you suggesting that --include-untracked in git stash should have 2 short options, -u and -A?

My personal preference would be to have one short option, and one that is consistent with all the other commands.

Whether this is the way forward will have to be hashed out when this ticket is addressed.

@johnlinp
Copy link

If this is the case, I think we should remove the "good first issue" label from this issue since it has more impact than a "good first issue" should do.

@dscho dscho removed the good first issue Good for newcomers label Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants