Merge branch 'ab/replace-graft-with-replace-advice'
The advice message to tell the user to migrate an existing graft file to the replace system when a graft file was read was shown even when "git replace --convert-graft-file" command, which is the way the message suggests to use, was running, which made little sense. * ab/replace-graft-with-replace-advice: advice: don't pointlessly suggest --convert-graft-file
This commit is contained in:
commit
671e629d6e
@ -495,6 +495,7 @@ static int convert_graft_file(int force)
|
|||||||
if (!fp)
|
if (!fp)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
advice_graft_file_deprecated = 0;
|
||||||
while (strbuf_getline(&buf, fp) != EOF) {
|
while (strbuf_getline(&buf, fp) != EOF) {
|
||||||
if (*buf.buf == '#')
|
if (*buf.buf == '#')
|
||||||
continue;
|
continue;
|
||||||
|
@ -461,7 +461,10 @@ test_expect_success '--convert-graft-file' '
|
|||||||
printf "%s\n%s %s\n\n# comment\n%s\n" \
|
printf "%s\n%s %s\n\n# comment\n%s\n" \
|
||||||
$(git rev-parse HEAD^^ HEAD^ HEAD^^ HEAD^2) \
|
$(git rev-parse HEAD^^ HEAD^ HEAD^^ HEAD^2) \
|
||||||
>.git/info/grafts &&
|
>.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 &&
|
test_path_is_missing .git/info/grafts &&
|
||||||
|
|
||||||
: verify that the history is now "grafted" &&
|
: verify that the history is now "grafted" &&
|
||||||
|
Loading…
Reference in New Issue
Block a user