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>
Felipe Contreras committed
May 28, 2013 at 22:56 UTC
c8d1351deb2ccb8634d5c3dd863dd37d0d8c082c
1 file changed
+9
-7
sequencer.c
+9
-7
@@ -474,7 +474,7 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
474
struct commit_message msg = { NULL, NULL, NULL, NULL, NULL };
475
char *defmsg = NULL;
476
struct strbuf msgbuf = STRBUF_INIT;
477
- int res, unborn = 0;
477
+ int res, unborn = 0, allow;
478
479
if (opts->no_commit) {
480
/*
@@ -624,14 +624,16 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
624
msg.subject);
625
print_advice(res == 1, opts);
626
rerere(opts->allow_rerere_auto);
627
- } else {
628
- int allow = allow_empty(opts, commit);
629
- if (allow < 0)
630
- return allow;
631
- if (!opts->no_commit)
632
- res = run_git_commit(defmsg, opts, allow);
627
+ goto leave;
628
}
629
630
+ allow = allow_empty(opts, commit);
631
+ if (allow < 0)
632
+ return allow;
633
+ if (!opts->no_commit)
634
+ res = run_git_commit(defmsg, opts, allow);
635
+
636
+leave:
637
free_message(&msg);
638
free(defmsg);
639