From 73c293bb6c15992690b16c90bcac243a76d86400 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Tue, 22 Nov 2016 12:14:37 -0800 Subject: submodule-config: rename commit_sha1 to treeish_name It is also possible to pass in any treeish name to lookup a submodule config. Make it clear by naming the variables accordingly. Looking up a submodule config by tree hash will come in handy in a later patch. Signed-off-by: Stefan Beller Reviewed-by: Brandon Williams Signed-off-by: Junio C Hamano --- t/t7411-submodule-config.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 't/t7411-submodule-config.sh') diff --git a/t/t7411-submodule-config.sh b/t/t7411-submodule-config.sh index 47562ce465..d389ae5408 100755 --- a/t/t7411-submodule-config.sh +++ b/t/t7411-submodule-config.sh @@ -93,6 +93,20 @@ test_expect_success 'error message contains blob reference' ' ) ' +test_expect_success 'using different treeishs works' ' + ( + cd super && + git tag new_tag && + tree=$(git rev-parse HEAD^{tree}) && + commit=$(git rev-parse HEAD^{commit}) && + test-submodule-config $commit b >expect && + test-submodule-config $tree b >actual.1 && + test-submodule-config new_tag b >actual.2 && + test_cmp expect actual.1 && + test_cmp expect actual.2 + ) +' + cat >super/expect_url <