summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5df1645)
raw | patch | inline | side by side (parent: 5df1645)
author | Christian Couder <chriscool@tuxfamily.org> | |
Tue, 13 Jul 2010 23:28:14 +0000 (01:28 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 16 Jul 2010 22:22:00 +0000 (15:22 -0700) |
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/revert.c | patch | blob | history |
diff --git a/builtin/revert.c b/builtin/revert.c
index b84b5b8645dce4fee190e7b11a5ac8ec24a994fc..ec931bdcfcc7089753f3a30b914fee74df6d80f5 100644 (file)
--- a/builtin/revert.c
+++ b/builtin/revert.c
mebuf.buf, help_msg());
rerere(allow_rerere_auto);
} else {
- fprintf(stderr, "Finished one %s.\n", mebuf.buf);
+ if (!no_commit)
+ res = run_git_commit(defmsg);
+ if (!res)
+ fprintf(stderr, "Finished one %s.\n", mebuf.buf);
}
strbuf_release(&mebuf);
free_message(&msg);
-
- if (res)
- return 1;
-
- if (!no_commit) {
- res = run_git_commit(defmsg);
- free(defmsg);
- return res;
- }
-
free(defmsg);
- return 0;
+ return res;
}
static void prepare_revs(struct rev_info *revs)