summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-05-29 03:56:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-03 18:40:55 (GMT)
commitc8d1351deb2ccb8634d5c3dd863dd37d0d8c082c (patch)
treece10f0f3af8e30071cf9f0c04cff5eca6d9304bf /sequencer.c
parentedca4152560522a431a51fc0a06147fc680b5b18 (diff)
downloadgit-c8d1351deb2ccb8634d5c3dd863dd37d0d8c082c.zip
git-c8d1351deb2ccb8634d5c3dd863dd37d0d8c082c.tar.gz
git-c8d1351deb2ccb8634d5c3dd863dd37d0d8c082c.tar.bz2
sequencer: remove useless indentation
By using good ol' goto. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sequencer.c b/sequencer.c
index ab6f8a7..b4989ba 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -474,7 +474,7 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
struct commit_message msg = { NULL, NULL, NULL, NULL, NULL };
char *defmsg = NULL;
struct strbuf msgbuf = STRBUF_INIT;
- int res, unborn = 0;
+ int res, unborn = 0, allow;
if (opts->no_commit) {
/*
@@ -624,14 +624,16 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
msg.subject);
print_advice(res == 1, opts);
rerere(opts->allow_rerere_auto);
- } else {
- int allow = allow_empty(opts, commit);
- if (allow < 0)
- return allow;
- if (!opts->no_commit)
- res = run_git_commit(defmsg, opts, allow);
+ goto leave;
}
+ allow = allow_empty(opts, commit);
+ if (allow < 0)
+ return allow;
+ if (!opts->no_commit)
+ res = run_git_commit(defmsg, opts, allow);
+
+leave:
free_message(&msg);
free(defmsg);