-
Notifications
You must be signed in to change notification settings - Fork 26.4k
parse-options.c: make OPTION__COUNTUP consider negative values #212
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pranitbauva1997 sent this commit (d9c691a...102abb1) as a patch to the mailing list with submitGit - here on Gmane, MARC |
The reason to make it consider negative values or more specifically "unspecified" values is to give the ability to differentiate between once, multiple time or with --no-option. Eg. : initialize verbose = -1 `git commit` => verbose = -1 `git commit -v` => verbose = 1 `git commit -v -v` => verbose = 2 `git commit --no-verbose` => verbose = 0 Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com> --- The discussion about this patch: [1] : http://thread.gmane.org/gmane.comp.version-control.git/289027 Previous version of the patch: [v1] : http://thread.gmane.org/gmane.comp.version-control.git/289061 Changes introduced: Use a different language in commit message to make the change and its utility more clear.
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Dec 11, 2019
fsmonitor updates for improved performance
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Jan 17, 2020
fsmonitor updates for improved performance
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Mar 24, 2020
fsmonitor updates for improved performance
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Jun 2, 2020
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Aug 3, 2020
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Nov 3, 2020
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Dec 23, 2020
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Dec 29, 2020
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Mar 19, 2021
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Aug 10, 2021
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Aug 15, 2021
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Aug 17, 2021
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Nov 2, 2021
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Nov 10, 2021
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Nov 16, 2021
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Jan 18, 2022
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Jan 28, 2022
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Mar 16, 2022
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
May 22, 2022
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Jun 23, 2022
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Jun 27, 2022
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Jul 14, 2022
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Sep 30, 2022
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Oct 4, 2022
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Nov 8, 2022
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Mar 15, 2023
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Mar 15, 2023
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
May 11, 2023
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Aug 23, 2023
vdye
pushed a commit
to vdye/git
that referenced
this pull request
Jan 9, 2024
fsmonitor updates for improved performance
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Apr 30, 2024
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
May 31, 2024
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Jun 19, 2024
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Jul 19, 2024
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Aug 23, 2024
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Sep 30, 2024
derrickstolee
pushed a commit
to derrickstolee/git
that referenced
this pull request
Oct 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The reason to make it consider negative values or more specifically
"unspecified" values is to differentiate between the option passed
once, multiple times or with --no-option. This makes the receiver
know what actually happened with the arguments which is particularly
required with option have multiple levels of that option.
Eg. :
initialize verbose = -1
git commit
=> verbose = -1git commit -v
=> verbose = 1git commit -v -v
=> verbose = 1git commit --no-verbose
=> verbose = 0Signed-off-by: Pranit Bauva pranit.bauva@gmail.com
The discussion on the mailing list[1] suggested this approach.
I plan to include this with my previous patch regarding "configuration
for commonly used command
git commit -v
" as this is a requirement forlatter.
[1] : http://thread.gmane.org/gmane.comp.version-control.git/289027