diff options
author | René Scharfe <l.s.r@web.de> | 2023-07-21 14:41:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-21 19:02:59 +0200 |
commit | 3a5f30874120880ddaa53d0db4c3b4ec0a07297a (patch) | |
tree | 12dc1eeceeb252e4ff15219f974c2f62286997ec /environment.c | |
parent | Merge branch 'jk/redact-h2h3-headers-fix' into maint-2.41 (diff) | |
download | git-3a5f30874120880ddaa53d0db4c3b4ec0a07297a.tar.xz git-3a5f30874120880ddaa53d0db4c3b4ec0a07297a.zip |
pack-objects: fix --no-keep-true-parents
Since 99fb6e04cb (pack-objects: convert to use parse_options(),
2012-02-01) git pack-objects has accepted --no-keep-true-parents, but
this option does the same as --keep-true-parents. That's because it's
defined using OPT_SET_INT with a value of 0, which sets 0 when negated
as well.
Turn --no-keep-true-parents into the opposite of --keep-true-parents by
using OPT_BOOL and storing the option's status directly in a variable
named "grafts_keep_true_parents" instead of in negative form in
"grafts_replace_parents".
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
-rw-r--r-- | environment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/environment.c b/environment.c index 28d18eaca8..fb113df8d0 100644 --- a/environment.c +++ b/environment.c @@ -75,7 +75,7 @@ enum push_default_type push_default = PUSH_DEFAULT_UNSPECIFIED; #endif enum object_creation_mode object_creation_mode = OBJECT_CREATION_MODE; char *notes_ref_name; -int grafts_replace_parents = 1; +int grafts_keep_true_parents; int core_apply_sparse_checkout; int core_sparse_checkout_cone; int sparse_expect_files_outside_of_patterns; |