Merge branch 'sb/submodule-diff-header-fix'

Error message tweak.

* sb/submodule-diff-header-fix:
  submodule: correct error message for missing commits
This commit is contained in:
Junio C Hamano 2017-10-03 15:42:49 +09:00
commit 9257d3d7db
2 changed files with 2 additions and 2 deletions

View File

@ -503,7 +503,7 @@ static void show_submodule_header(struct diff_options *o, const char *path,
if (add_submodule_odb(path)) {
if (!message)
message = "(not initialized)";
message = "(commits not present)";
goto output_header;
}

View File

@ -95,7 +95,7 @@ test_expect_success 'submodule not initialized in new clone' '
git clone . sm3 &&
git -C sm3 diff-tree -p --no-commit-id --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $smhead1...$smhead2 (not initialized)
Submodule sm1 $smhead1...$smhead2 (commits not present)
EOF
test_cmp expected actual
'