diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-07-19 04:37:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-19 09:16:37 -0700 |
commit | 83bb8e5a0689e236f06a24ffede0b4c823b4a0b2 (patch) | |
tree | 8f2f9e11fee38d4a7f44193289d969428c8f8a9a /commit.c | |
parent | fb7d80edcae482f4fa5d4be0227dc3054734e5f3 (diff) |
show-branch: --no-sparse should give dense output
"git show-branch --no-sparse" behaved exactly the same way as "git
show-branch --sparse", which did not make any sense. This was
because it used a variable "dense" initialized to 1 by default to
give "non sparse" behaviour, and OPT_SET_INT() to set the varilable
to 0 in response to the "--sparse" option. Unfortunately,
OPT_SET_INT() sets 0 to the given variable when the option is
negated.
Flip the polarity of the variable "dense" by renaming it to "sparse"
and initializing it to 0, and have OPT_SET_INT() set the variable to
1 when "--sparse" is given. This way, "--no-sparse" would set 0 to
the variable and would give us the "dense" behaviour.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions