Skip to content

Commit c50d730

Browse files
committed
Set +x in index in other gix-status fixtures
For these the current situation is simpler because the tests currently using them do not contain assertions whose correctness varies based on whether the affected files modes' have +x or -x. But it is the intent of the fixtures to record +x modes for some particular files in the test repository, so this modifies the scripts to do so, even on Windows where `chmod +x` does not take effect. This also allows the tests to include a broader range of metadata and, specifically, may verify in some comparisons that having a mode of 0o755 instead of 0o644 does not cause a problem, even though not explicitly asserted in detail.
1 parent 9b12a78 commit c50d730

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

gix-status/tests/fixtures/status_many.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ git init -q changed-and-untracked
1212
echo "different content" > dir/content2
1313

1414
git add -A
15+
git update-index --chmod=+x executable # For Windows.
1516
git commit -m "Commit"
1617
echo "change" >> executable
1718

gix-status/tests/fixtures/status_removed.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ mkdir dir/sub-dir
1313
(cd dir/sub-dir && ln -sf ../content symlink)
1414

1515
git add -A
16+
git update-index --chmod=+x executable # For Windows.
1617
git commit -m "Commit"
1718
rm -rf ./empty ./executable ./dir/content ./dir/sub-dir/symlink
18-
git reset
19+
git reset

gix-status/tests/fixtures/status_unchanged.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ mkdir dir/sub-dir
1313
(cd dir/sub-dir && ln -sf ../content symlink)
1414

1515
git add -A
16+
git update-index --chmod=+x executable # For Windows.
1617
git commit -m "Commit"
1718

1819
touch ./empty ./executable ./dir/content ./dir/sub-dir/symlink
1920

20-
git reset # ensure index timestamp is large enough to not mark everything racy
21+
git reset # ensure index timestamp is large enough to not mark everything racy

0 commit comments

Comments
 (0)