aboutsummaryrefslogtreecommitdiff
path: root/t/t7411-submodule-config.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2016-11-22 12:14:37 -0800
committerJunio C Hamano <gitster@pobox.com>2016-11-22 14:43:03 -0800
commit73c293bb6c15992690b16c90bcac243a76d86400 (patch)
tree49b5570f7f76e846002f69f712231866cd50ffae /t/t7411-submodule-config.sh
parente6ead0f2dba3bdd9c1250298a4d82ea05cec2333 (diff)
downloadgit-73c293bb6c15992690b16c90bcac243a76d86400.tar.gz
git-73c293bb6c15992690b16c90bcac243a76d86400.tar.xz
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 <sbeller@google.com> Reviewed-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7411-submodule-config.sh')
-rwxr-xr-xt/t7411-submodule-config.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t7411-submodule-config.sh b/t/t7411-submodule-config.sh
index 47562ce46..d389ae540 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 <<EOF
Submodule url: 'git@somewhere.else.net:a.git' for path 'b'
Submodule url: 'git@somewhere.else.net:submodule.git' for path 'submodule'