git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] rebase: replace incorrect logical negation by correct bitwise one

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
May 21, 2019, 17:50 UTC
Message-ID
<aa0acf4c5ff843a480afdb5715fa03186d82a6d1.1558461018.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.221.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

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>
---
 builtin/rebase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index ba3a574e40..db6ca9bd7d 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1203,7 +1203,7 @@ static int rebase_config(const char *var, const char *value, void *data)
 		if (git_config_bool(var, value))
 			opts->flags |= REBASE_DIFFSTAT;
 		else
-			opts->flags &= !REBASE_DIFFSTAT;
+			opts->flags &= ~REBASE_DIFFSTAT;
 		return 0;
 	}
 
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Junio C Hamano
Message 2 of 4 in “Fix two issues pointed out by Coverity”
  1. 0/2 Fix two issues pointed out by CoverityJohannes Schindelin via GitGitGadget, May 21, 2019
  2. 1/2 rebase: replace incorrect logical negation by correct bitwise oneJohannes Schindelin via GitGitGadget, May 21, 2019
  3. Junio C HamanoMay 28, 2019
  4. 2/2 bisect--helper: verify HEAD could be parsed before continuingJohannes Schindelin via GitGitGadget, May 21, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.