path: root/builtin
diff options
authorÆvar Arnfjörð Bjarmason <>2017-03-24 18:40:56 (GMT)
committerJunio C Hamano <>2017-03-24 19:15:26 (GMT)
commit1e0c3b680c6e7b37fc51bd69a410af01897a4f94 (patch)
treef99815cbeb864c4b174342e1fc6b3bb5b4fac6be /builtin
parent6a338149f623f493525324bc0f8d7bb9257cb840 (diff)
tag: change --point-at to default to HEAD
Change the --points-at option to default to HEAD for consistency with its siblings --contains, --merged etc. which default to HEAD. Previously we'd get: $ git tag --points-at 2>&1 | head -n 1 error: option `points-at' requires a value This changes behavior added in commit ae7706b9ac (tag: add --points-at list option, 2012-02-08). Signed-off-by: Ævar Arnfjörð Bjarmason <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin')
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index 3c68696..8bf6d85 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -431,7 +431,8 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
N_("field name to sort on"), &parse_opt_ref_sorting),
OPTION_CALLBACK, 0, "points-at", &filter.points_at, N_("object"),
- N_("print only tags of the object"), 0, parse_opt_object_name
+ N_("print only tags of the object"), PARSE_OPT_LASTARG_DEFAULT,
+ parse_opt_object_name, (intptr_t) "HEAD"
OPT_STRING( 0 , "format", &format, N_("format"), N_("format to use for the output")),
OPT_BOOL('i', "ignore-case", &icase, N_("sorting and filtering are case insensitive")),