summaryrefslogtreecommitdiff
path: root/advice.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-11 13:31:07 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-11 13:31:07 -0700
commitf4c52a05277f8f5901f7663f6ab339271b814872 (patch)
tree994c7cbe55b25f15a952eea7f6df7e8f3f39877b /advice.c
parent71e120202fe073bd2e4e9db59ca01ab7c5e72f7e (diff)
parent798c35fcd8a71a094ca68ac05d81e08c5ac8166d (diff)
downloadgit-f4c52a05277f8f5901f7663f6ab339271b814872.tar.gz
Merge branch 'nd/warn-ambiguous-object-name'
"git cmd <name>", when <name> happens to be a 40-hex string, directly uses the 40-hex string as an object name, even if a ref "refs/<some hierarchy>/<name>" exists. This disambiguation order is unlikely to change, but we should warn about the ambiguity just like we warn when more than one refs/ hierachies share the same name. * nd/warn-ambiguous-object-name: get_sha1: warn about full or short object names that look like refs
Diffstat (limited to 'advice.c')
-rw-r--r--advice.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/advice.c b/advice.c
index a8deee6e64..54315cbd0a 100644
--- a/advice.c
+++ b/advice.c
@@ -14,6 +14,7 @@ int advice_resolve_conflict = 1;
int advice_implicit_identity = 1;
int advice_detached_head = 1;
int advice_set_upstream_failure = 1;
+int advice_object_name_warning = 1;
static struct {
const char *name;
@@ -33,6 +34,7 @@ static struct {
{ "implicitidentity", &advice_implicit_identity },
{ "detachedhead", &advice_detached_head },
{ "setupstreamfailure", &advice_set_upstream_failure },
+ { "object_name_warning", &advice_object_name_warning },
/* make this an alias for backward compatibility */
{ "pushnonfastforward", &advice_push_update_rejected }