diff --git a/builtin/replace.c b/builtin/replace.c index a58b9c6d13..affcdfb416 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -495,6 +495,7 @@ static int convert_graft_file(int force) if (!fp) return -1; + advice_graft_file_deprecated = 0; while (strbuf_getline(&buf, fp) != EOF) { if (*buf.buf == '#') continue; diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 86374a9c52..5d6d3184ac 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -461,7 +461,10 @@ test_expect_success '--convert-graft-file' ' printf "%s\n%s %s\n\n# comment\n%s\n" \ $(git rev-parse HEAD^^ HEAD^ HEAD^^ HEAD^2) \ >.git/info/grafts && - git replace --convert-graft-file && + git status 2>stderr && + test_i18ngrep "hint:.*grafts is deprecated" stderr && + git replace --convert-graft-file 2>stderr && + test_i18ngrep ! "hint:.*grafts is deprecated" stderr && test_path_is_missing .git/info/grafts && : verify that the history is now "grafted" &&