summaryrefslogtreecommitdiff
path: root/t/t4059-diff-submodule-not-initialized.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-09-26 18:27:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-28 05:15:20 (GMT)
commit2d94dd2fc6428ff5f0a18223aadaaecd49fd18e5 (patch)
tree88b268cb04b414544bca2de3bebc27ecc9ec3251 /t/t4059-diff-submodule-not-initialized.sh
parent7451fcdc0d3cffdb9aa79d2651830b44a8e052d6 (diff)
downloadgit-2d94dd2fc6428ff5f0a18223aadaaecd49fd18e5.zip
git-2d94dd2fc6428ff5f0a18223aadaaecd49fd18e5.tar.gz
git-2d94dd2fc6428ff5f0a18223aadaaecd49fd18e5.tar.bz2
submodule: correct error message for missing commits
When a submodule diff should be displayed we currently just add the submodule objects to the main object store and then e.g. walk the revision graph and create a summary for that submodule. It is possible that we are missing the submodule either completely or partially, which we currently differentiate with different error messages depending on whether (1) the whole submodule object store is missing or (2) just the needed for this particular diff. (1) is reported as "not initialized", and (2) is reported as "commits not present". If a submodule is deinit'ed its repository data is still around inside the superproject, such that the diff can still be produced. In that way the error message (1) is misleading as we can have a diff despite the submodule being not initialized. Downgrade the error message (1) to be the same as (2) and just say the commits are not present, as that is the true reason why the diff cannot be shown. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4059-diff-submodule-not-initialized.sh')
-rwxr-xr-xt/t4059-diff-submodule-not-initialized.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t4059-diff-submodule-not-initialized.sh b/t/t4059-diff-submodule-not-initialized.sh
index cd70fd5..49bca7b 100755
--- a/t/t4059-diff-submodule-not-initialized.sh
+++ b/t/t4059-diff-submodule-not-initialized.sh
@@ -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
'