Skip to content

Commit

Permalink
Set +x in index in other gix-status fixtures
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Nov 3, 2024
1 parent 9b12a78 commit c50d730
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions gix-status/tests/fixtures/status_many.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ git init -q changed-and-untracked
echo "different content" > dir/content2

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

Expand Down
3 changes: 2 additions & 1 deletion gix-status/tests/fixtures/status_removed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mkdir dir/sub-dir
(cd dir/sub-dir && ln -sf ../content symlink)

git add -A
git update-index --chmod=+x executable # For Windows.
git commit -m "Commit"
rm -rf ./empty ./executable ./dir/content ./dir/sub-dir/symlink
git reset
git reset
3 changes: 2 additions & 1 deletion gix-status/tests/fixtures/status_unchanged.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ mkdir dir/sub-dir
(cd dir/sub-dir && ln -sf ../content symlink)

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

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

git reset # ensure index timestamp is large enough to not mark everything racy
git reset # ensure index timestamp is large enough to not mark everything racy

0 comments on commit c50d730

Please sign in to comment.