git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Git List <git@vger.kernel.org>
Cc: "SZEDER Gábor" <szeder@ira.uka.de>
Subject: [PATCH v2] sequencer: trivial cleanup
Date: Sat, 14 Sep 2013 03:45:06 +0530	[thread overview]
Message-ID: <1379110506-21721-1-git-send-email-artagnon@gmail.com> (raw)

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

                 reply	other threads:[~2013-09-13 22:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379110506-21721-1-git-send-email-artagnon@gmail.com \
    --to=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=szeder@ira.uka.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).