summaryrefslogtreecommitdiff
path: root/t/t0003-attributes.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-05-17 10:11:41 -0700
committerJunio C Hamano <gitster@pobox.com>2023-05-17 10:11:41 -0700
commit67a3b2b39f638872531324e03217fa58f7b9ad1e (patch)
tree5c4e9c7b9e2c0efc9c9f9e7e70fb11b104f95890 /t/t0003-attributes.sh
parent3307f7dde2ae8f5281d0782f7291a073c9b1cdc2 (diff)
parent44451a2e5eec5360378be23e2cdbd9ecee49e14e (diff)
downloadgit-67a3b2b39f638872531324e03217fa58f7b9ad1e.tar.gz
Merge branch 'jc/attr-source-tree'
"git --attr-source=<tree> cmd $args" is a new way to have any command to read attributes not from the working tree but from the given tree object. * jc/attr-source-tree: attr: teach "--attr-source=<tree>" global option to "git"
Diffstat (limited to 't/t0003-attributes.sh')
-rwxr-xr-xt/t0003-attributes.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 89b306cb11..26e082f05b 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -30,8 +30,17 @@ attr_check_quote () {
attr_check_source () {
path="$1" expect="$2" source="$3" git_opts="$4" &&
- git $git_opts check-attr --source $source test -- "$path" >actual 2>err &&
echo "$path: test: $expect" >expect &&
+
+ git $git_opts check-attr --source $source test -- "$path" >actual 2>err &&
+ test_cmp expect actual &&
+ test_must_be_empty err &&
+
+ git $git_opts --attr-source="$source" check-attr test -- "$path" >actual 2>err &&
+ test_cmp expect actual &&
+ test_must_be_empty err
+
+ GIT_ATTR_SOURCE="$source" git $git_opts check-attr test -- "$path" >actual 2>err &&
test_cmp expect actual &&
test_must_be_empty err
}