Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
sequencer: remove useless indentation
author
Felipe Contreras
<felipe.contreras@gmail.com>
Wed, 29 May 2013 03:56:21 +0000
(22:56 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 3 Jun 2013 18:40:55 +0000
(11:40 -0700)
By using good ol' goto.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
edca415
)
diff --git
a/sequencer.c
b/sequencer.c
index ab6f8a722d1dfa8f9633d8c046aad26ef4d0404e..b4989ba2c305aca92f7d7455bddec31001b951d5 100644
(file)
--- 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;
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) {
/*
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);
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);
free_message(&msg);
free(defmsg);