advice: move advice.graftFileDeprecated squashing to commit.[ch]
Move the squashing of the advice.graftFileDeprecated advice over to an
external variable in commit.[ch], allowing advice() to purely use the
new-style API of invoking advice() with an enum.
See 8821e90a09
(advice: don't pointlessly suggest
--convert-graft-file, 2018-11-27) for why quieting this advice was
needed. It's more straightforward to move this code to commit.[ch] and
use it builtin/replace.c, than to go through the indirection of
advice.[ch].
Because this was the last advice_config variable we can remove that
old facility from advice.c.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
c2a4b6d4ee
commit
ab628588f8
@ -507,7 +507,7 @@ static int convert_graft_file(int force)
|
||||
if (!fp)
|
||||
return -1;
|
||||
|
||||
advice_graft_file_deprecated = 0;
|
||||
no_graft_file_deprecated_advice = 1;
|
||||
while (strbuf_getline(&buf, fp) != EOF) {
|
||||
if (*buf.buf == '#')
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user