pack-objects: fix --no-keep-true-parents
commit3a5f30874120880ddaa53d0db4c3b4ec0a07297a
authorRené Scharfe <l.s.r@web.de>
Fri, 21 Jul 2023 12:41:56 +0000 (21 14:41 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Jul 2023 17:02:59 +0000 (21 10:02 -0700)
tree12dc1eeceeb252e4ff15219f974c2f62286997ec
parentfb7d80edcae482f4fa5d4be0227dc3054734e5f3
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>
builtin/pack-objects.c
commit.c
environment.c
environment.h