From a8bc269f11b34e60f5fdbd8e831a654dd6b6b67e Mon Sep 17 00:00:00 2001 From: Dave Olszewski Date: Mon, 16 Feb 2015 01:16:19 -0500 Subject: push: allow --follow-tags to be set by config push.followTags Signed-off-by: Dave Olszewski Helped-by: Jeff King Signed-off-by: Junio C Hamano --- builtin/push.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'builtin') diff --git a/builtin/push.c b/builtin/push.c index bba22b86b9..57c138bd7b 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -473,11 +473,21 @@ static int option_parse_recurse_submodules(const struct option *opt, static int git_push_config(const char *k, const char *v, void *cb) { + int *flags = cb; int status; status = git_gpg_config(k, v, NULL); if (status) return status; + + if (!strcmp(k, "push.followtags")) { + if (git_config_bool(k, v)) + *flags |= TRANSPORT_PUSH_FOLLOW_TAGS; + else + *flags &= ~TRANSPORT_PUSH_FOLLOW_TAGS; + return 0; + } + return git_default_config(k, v, NULL); } -- cgit v1.2.3