test: shorten repo/folder names

Shorten the repo/folder names in the nested .gitattributes test
to prevent AppVeyor failure
This commit is contained in:
Preben Ingvaldsen 2018-05-31 11:26:58 -07:00
parent 30cdf66a21
commit 6e40c67a5c
2 changed files with 10 additions and 10 deletions

@ -56,17 +56,17 @@ setup_local_branch_with_gitattrs() {
setup_local_branch_with_nested_gitattrs() {
set -e
reponame="migrate-single-remote-branch-with-nested-attrs"
reponame="nested-attrs"
remove_and_create_local_repo "$reponame"
mkdir subtree
mkdir b
base64 < /dev/urandom | head -c 120 > a.txt
base64 < /dev/urandom | head -c 140 > a.md
base64 < /dev/urandom | head -c 140 > subtree/a.md
base64 < /dev/urandom | head -c 140 > b/a.md
git add a.txt a.md subtree/a.md
git add a.txt a.md b/a.md
git commit -m "initial commit"
git lfs track "*.txt"
@ -74,13 +74,13 @@ setup_local_branch_with_nested_gitattrs() {
git add .gitattributes
git commit -m "add .gitattributes"
cd subtree
cd b
git lfs track "*.md"
cd ..
git add subtree/.gitattributes
git add b/.gitattributes
git commit -m "add nested .gitattributes"
}

@ -132,18 +132,18 @@ begin_test "migrate import --no-rewrite (nested .gitattributes)"
[ !"$(echo "$master_attrs" | grep -q ".md")" ]
# Ensure a .md filter exists in the nested .gitattributes
nested_attrs="$(git cat-file -p "$master:subtree/.gitattributes")"
nested_attrs="$(git cat-file -p "$master:b/.gitattributes")"
echo "$nested_attrs" | grep -q "*.md filter=lfs diff=lfs merge=lfs"
md_oid="$(calc_oid "$(git cat-file -p :a.md)")"
nested_md_oid="$(calc_oid "$(git cat-file -p :subtree/a.md)")"
nested_md_oid="$(calc_oid "$(git cat-file -p :b/a.md)")"
txt_oid="$(calc_oid "$(git cat-file -p :a.txt)")"
git lfs migrate import --no-rewrite a.txt subtree/a.md
git lfs migrate import --no-rewrite a.txt b/a.md
# Ensure a.txt and subtree/a.md were imported, even though *.md only exists in the
# nested subtree/.gitattributes file
assert_pointer "refs/heads/master" "subtree/a.md" "$nested_md_oid" "140"
assert_pointer "refs/heads/master" "b/a.md" "$nested_md_oid" "140"
assert_pointer "refs/heads/master" "a.txt" "$txt_oid" "120"
assert_local_object "$nested_md_oid" 140