rebase: replace incorrect logical negation by correct bitwise one
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 21 May 2019 17:50:20 +0000 (10:50 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2019 17:49:19 +0000 (10:49 -0700)
In bff014dac7d9 (builtin rebase: support the `verbose` and `diffstat`
options, 2018-09-04), we added a line that wanted to remove the
`REBASE_DIFFSTAT` bit from the flags, but it used an incorrect negation.

Found by Coverity.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c

index b5c99ec..58607a2 100644 (file)
@@ -653,7 +653,7 @@ static int rebase_config(const char *var, const char *value, void *data)
                if (git_config_bool(var, value))
                        opts->flags |= REBASE_DIFFSTAT;
                else
                if (git_config_bool(var, value))
                        opts->flags |= REBASE_DIFFSTAT;
                else
-                       opts->flags &= !REBASE_DIFFSTAT;
+                       opts->flags &= ~REBASE_DIFFSTAT;
                return 0;
        }
 
                return 0;
        }