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

[PATCH v2] sequencer: trivial cleanup

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Sep 13, 2013, 22:15 UTC
Message-ID
<1379110506-21721-1-git-send-email-artagnon@gmail.com>

Consider that the return values of allow_empty() could either be negative, zero, or one. However, there is no reason to be overtly conservative about it: we might as well return positive values as well since the callsite has no problems with it.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 sequencer.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 351548f..ae25b5b 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -463,13 +463,7 @@ static int allow_empty(struct replay_opts *opts, struct commit *commit)
 	if (opts->keep_redundant_commits)
 		return 1;
 
-	empty_commit = is_original_commit_empty(commit);
-	if (empty_commit < 0)
-		return empty_commit;
-	if (!empty_commit)
-		return 0;
-	else
-		return 1;
+	return is_original_commit_empty(commit);
 }
 
 static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
-- 
1.8.4.299.gb3e7d24.dirty
Message 1 of 1 in “sequencer: trivial cleanup”
  1. sequencer: trivial cleanupRamkumar Ramachandra, Sep 13, 2013

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.