branch, tag: use porcelain output
authorKarthik Nayak <karthik.188@gmail.com>
Tue, 10 Jan 2017 08:49:51 +0000 (14:19 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 Jan 2017 20:43:04 +0000 (12:43 -0800)
Call ref-filter's setup_ref_filter_porcelain_msg() to enable
translated messages for the %(upstream:tack) atom. Although branch.c
doesn't currently use ref-filter's printing API's, this will ensure
that when it does in the future patches, we do not need to worry about
translation.

Written-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c
builtin/tag.c
index 6423ebce5dd6010ad6bb9fc262e3fa2c6420883e..34cd61cd904c3f8d36d9c00ddba7d9dd2bce4590 100644 (file)
@@ -649,6 +649,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
                OPT_END(),
        };
 
+       setup_ref_filter_porcelain_msg();
+
        memset(&filter, 0, sizeof(filter));
        filter.kind = FILTER_REFS_BRANCHES;
        filter.abbrev = -1;
index b4789cec4569a07a9497e5b39f0646763ec89122..8a1a476db711820802cfb09d87d4203f0b0d0305 100644 (file)
@@ -375,6 +375,8 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
                OPT_END()
        };
 
+       setup_ref_filter_porcelain_msg();
+
        git_config(git_tag_config, sorting_tail);
 
        memset(&opt, 0, sizeof(opt));