summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-01-27 00:35:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-28 00:28:18 (GMT)
commitf41179f16ba2fc16e31be81518536008afe2e278 (patch)
tree4a602c0e5688814a2d6823649595f64e5f3588db /builtin/merge.c
parentbf3ff338a25b7353ec6d39d31e14d081be9e3471 (diff)
downloadgit-f41179f16ba2fc16e31be81518536008afe2e278.zip
git-f41179f16ba2fc16e31be81518536008afe2e278.tar.gz
git-f41179f16ba2fc16e31be81518536008afe2e278.tar.bz2
parse-options: avoid magic return codes
Give names to these magic negative numbers. Make parse_opt_ll_cb return an enum to make clear it can actually control parse_options() with different return values (parse_opt_cb can too, but nobody needs it). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 07839b0..de64d78 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -112,8 +112,9 @@ static int option_parse_message(const struct option *opt,
return 0;
}
-static int option_read_message(struct parse_opt_ctx_t *ctx,
- const struct option *opt, int unset)
+static enum parse_opt_result option_read_message(struct parse_opt_ctx_t *ctx,
+ const struct option *opt,
+ int unset)
{
struct strbuf *buf = opt->value;
const char *arg;