Skip to content

Commit 9257d3d

Browse files
committed
Merge branch 'sb/submodule-diff-header-fix'
Error message tweak. * sb/submodule-diff-header-fix: submodule: correct error message for missing commits
2 parents 98c57ea + 2d94dd2 commit 9257d3d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

submodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ static void show_submodule_header(struct diff_options *o, const char *path,
503503

504504
if (add_submodule_odb(path)) {
505505
if (!message)
506-
message = "(not initialized)";
506+
message = "(commits not present)";
507507
goto output_header;
508508
}
509509

t/t4059-diff-submodule-not-initialized.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ test_expect_success 'submodule not initialized in new clone' '
9595
git clone . sm3 &&
9696
git -C sm3 diff-tree -p --no-commit-id --submodule=log HEAD >actual &&
9797
cat >expected <<-EOF &&
98-
Submodule sm1 $smhead1...$smhead2 (not initialized)
98+
Submodule sm1 $smhead1...$smhead2 (commits not present)
9999
EOF
100100
test_cmp expected actual
101101
'

0 commit comments

Comments
 (0)