From 431bb23a271ef45e22ad4a2def2e0ba0a1954e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 26 May 2018 15:55:27 +0200 Subject: am: move advice.amWorkDir parsing back to advice.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The only benefit from this move (apart from cleaner code) is that advice.amWorkDir should now show up in `git help --config`. There should be no regression since advice config is always read by the git_default_config(). While at there, use advise() like other code. We now get "hint: " prefix and the output is stderr instead of stdout (which is also the reason for the test update because stderr is checked in a following test and the extra advice can fail it). Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- advice.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'advice.c') diff --git a/advice.c b/advice.c index 2aca11f45e..52aa85bdfd 100644 --- a/advice.c +++ b/advice.c @@ -17,6 +17,7 @@ int advice_implicit_identity = 1; int advice_detached_head = 1; int advice_set_upstream_failure = 1; int advice_object_name_warning = 1; +int advice_amworkdir = 1; int advice_rm_hints = 1; int advice_add_embedded_repo = 1; int advice_ignored_hook = 1; @@ -68,6 +69,7 @@ static struct { { "detachedHead", &advice_detached_head }, { "setupStreamFailure", &advice_set_upstream_failure }, { "objectNameWarning", &advice_object_name_warning }, + { "amWorkDir", &advice_amworkdir }, { "rmHints", &advice_rm_hints }, { "addEmbeddedRepo", &advice_add_embedded_repo }, { "ignoredHook", &advice_ignored_hook }, -- cgit v1.2.3