Skip to content

Commit 4743361

Browse files
authored
Merge pull request #2575 from SarthakB11/fix/issue-2316
Document why each fixture archive is .gitignored
2 parents 24cdbb0 + 1980190 commit 4743361

21 files changed

Lines changed: 173 additions & 7 deletions

File tree

  • gix-archive/tests/fixtures/generated-archives
  • gix-attributes/tests/fixtures/generated-archives
  • gix-blame/tests/fixtures/generated-archives
  • gix-command/tests/fixtures/generated-archives
  • gix-config/tests/fixtures/generated-archives
  • gix-diff/tests/fixtures/generated-archives
  • gix-dir/tests/fixtures/generated-archives
  • gix-discover/tests/fixtures/generated-archives
  • gix-filter/tests/fixtures/generated-archives
  • gix-fsck/tests/fixtures/generated-archives
  • gix-ignore/tests/fixtures/generated-archives
  • gix-index/tests/fixtures/generated-archives
  • gix-odb/tests/fixtures/generated-archives
  • gix-refspec/tests/fixtures/generated-archives
  • gix-ref/tests/fixtures/generated-archives
  • gix-status/tests/fixtures/generated-archives
  • gix-url/tests/fixtures/generated-archives
  • gix-worktree-state/tests/fixtures/generated-archives
  • gix-worktree-stream/tests/fixtures/generated-archives
  • gix-worktree/tests/fixtures/generated-archives
  • gix/tests/fixtures/generated-archives
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
# The fixture script uses `ln -s`, an executable-bit toggle, and a
2+
# filter driver — features that cannot be round-tripped through an archive
3+
# extracted on every supported platform (notably Windows). The script is re-run
4+
# on the test host instead.
15
basic.tar
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
# The fixture bakes a `baseline` file from `git check-attr -a`
2+
# output produced by the host's `git` binary. The exact format/lookup-order may
3+
# be sensitive to the git version, so the fixture is re-run on the test host to
4+
# stay aligned with the comparing git.
15
make_attributes_baseline.tar
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
# The fixture bakes `git blame --porcelain` baseline files (under
2+
# `.git/*.baseline`) produced by the host's `git` binary. The exact textual
3+
# output may be sensitive to the git version, so the fixture is re-run locally to
4+
# stay aligned with the comparing git on the test host. Both SHA-1 and SHA-256
5+
# variants share this constraint.
16
make_blame_repo.tar
2-
make_blame_repo_sha256.tar
7+
make_blame_repo_sha256.tar
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
# The fixture seeds a tree of files with `.exe`/`.com` names that
2+
# carry no content beyond their stub shebang. On Windows, executable extensions
3+
# are interpreted at runtime and committing such a tree adds little value over
4+
# regenerating it locally — every test host can produce the same files in a
5+
# fraction of a second. Re-running the script also keeps the test aligned with
6+
# installation-wide Git line-ending and executable-bit behavior on extraction.
17
win_path_lookup.tar
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
# The test (`from_git_dir`) drives `gix-config` through
2+
# `GIT_CONFIG_SYSTEM`, `HOME` and `USERPROFILE` overrides that point at the
3+
# generated worktree directory. The fixture is regenerated on each host so the
4+
# `system.config`, `.gitconfig`, `c.config`, `b.config` and XDG-shaped
5+
# `.config/git/config` files always live at the absolute path the test injects
6+
# into the environment for the current run.
17
/make_config_repo.tar
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
# The auto-generated sliders fixtures. For now it's experimental, but we may store it later once it's all working.
1+
# `make_diff_for_sliders_repo.sh` is a placeholder generated by the
2+
# `create-diff-cases` subcommand of `internal-tools` (see
3+
# `gix-diff/tests/README.md`). The auto-generated sliders fixtures are
4+
# experimental for now; we may track them later once the format stabilizes.
25
/make_diff_for_sliders_repo.tar
3-
/make_diff_for_sliders_repo_sha256.tar
6+
/make_diff_for_sliders_repo_sha256.tar
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Archives below are intentionally not tracked. Each fixture uses host-only
2+
# features (absolute paths baked into config, symlinks, or FIFOs) that cannot
3+
# be round-tripped through a committed archive, so the script is re-run on the
4+
# test host instead.
5+
6+
# `nonstandard-worktree` sets `core.worktree "$PWD"` (an absolute path).
7+
# Several other sub-repos clone with relative URLs that resolve via the host's
8+
# working directory.
19
many.tar
10+
# Uses `ln -s`, including breakout symlinks (`../..`) that cannot be safely
11+
# extracted on Windows.
212
many-symlinks.tar
3-
fifo.tar
13+
# Uses `mkfifo`; FIFOs cannot be represented in archives extracted on Windows.
14+
fifo.tar
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
# The fixture creates linked worktrees (`git worktree add`) whose
2+
# `.git` files and `.git/worktrees/*/gitdir` entries store absolute paths into
3+
# the host's working directory. Re-running the script on the test host produces
4+
# the correct paths for that machine.
15
/make_basic_repo.tar
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
# `baseline.sh` runs the host's `git` through a clean/smudge
2+
# filter driver supplied as its `$1` argument (a host-absolute path to the test
3+
# helper binary). Both the driver path and any filter output baked into the
4+
# resulting working tree are host-specific, so the fixture must be regenerated
5+
# per run. Both SHA-1 and SHA-256 variants share this constraint.
16
/baseline.tar
27
/baseline_sha256.tar
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
# The fixture sets `GIT_CONFIG_GLOBAL` to a host-absolute path and
2+
# performs `git clone --no-local --no-hardlinks --filter=...` partial clones
3+
# whose alternates/promisor metadata embeds the host path of `./base`, so a
4+
# committed archive would not relocate to the test runner's checkout.
15
make_test_repos.tar

0 commit comments

Comments
 (0)