From: Junio C Hamano Date: Tue, 11 Jun 2013 20:31:07 +0000 (-0700) Subject: Merge branch 'nd/warn-ambiguous-object-name' X-Git-Url: https://repo.or.cz/w/git/mingw.git/commitdiff_plain/f4c52a05277f8f5901f7663f6ab339271b814872 Merge branch 'nd/warn-ambiguous-object-name' "git cmd ", when happens to be a 40-hex string, directly uses the 40-hex string as an object name, even if a ref "refs//" 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 --- f4c52a05277f8f5901f7663f6ab339271b814872 diff --cc advice.c index a8deee6e64,22abde9bc4..54315cbd0a --- a/advice.c +++ b/advice.c @@@ -13,7 -12,7 +13,8 @@@ int advice_commit_before_merge = 1 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; @@@ -32,7 -30,7 +33,8 @@@ { "resolveconflict", &advice_resolve_conflict }, { "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 } diff --cc advice.h index 94caa32f92,24d5420b7a..fefe39ac5c --- a/advice.h +++ b/advice.h @@@ -16,7 -15,7 +16,8 @@@ extern int advice_commit_before_merge extern int advice_resolve_conflict; extern int advice_implicit_identity; extern int advice_detached_head; +extern int advice_set_upstream_failure; + extern int advice_object_name_warning; int git_default_advice_config(const char *var, const char *value); void advise(const char *advice, ...);