Skip to content

Document why each fixture archive is .gitignored#2575

Merged
Sebastian Thiel (Byron) merged 2 commits intoGitoxideLabs:mainfrom
SarthakB11:fix/issue-2316
May 6, 2026
Merged

Document why each fixture archive is .gitignored#2575
Sebastian Thiel (Byron) merged 2 commits intoGitoxideLabs:mainfrom
SarthakB11:fix/issue-2316

Conversation

@SarthakB11
Copy link
Copy Markdown
Contributor

Document why each fixture archive is .gitignored

Fixes #2316

What changed

For every tests/fixtures/generated-archives/.gitignore in the workspace, an
inline #-comment now sits above each listed *.tar entry explaining why that
archive is not committed. The reason for each line was derived from reading the
corresponding *.sh fixture script (and, where the script alone wasn't
conclusive, the surrounding test code).

Only .gitignore files are touched. No fixture scripts, archives, or test code
are modified.

Recurring categories

The reasons cluster into a small set:

  • POSIX-only filesystem features that don't unpack on Windows without elevated
    privileges, or aren't representable at all: symlinks (ln -s), FIFOs
    (mkfifo), restrictive modes (chmod 000, chmod -x).
  • Host-absolute paths baked into git state: core.worktree,
    .git/objects/info/alternates, linked-worktree gitdir pointers,
    .git/modules/<name>/config, --shared file://$PWD/... clones.
  • Baselines captured from the host's git binary (git check-attr,
    git check-ignore, git blame --porcelain, git fetch --refmap= --dry-run,
    git fetch-pack --diag-url). Their textual output is sensitive to the git
    version, so a committed snapshot would drift from the binary running the
    test.
  • Filesystem case-sensitivity: make_ignorecase_collisions produces paths
    differing only by case, which fail to extract on default macOS / Windows
    volumes.
  • Time-range-sensitive metadata: gix-index/file_metadata.sh writes pre-1970
    and post-2038 mtimes whose representable range depends on the host
    filesystem.
  • Experimental / placeholder fixtures (gix-diff/make_diff_for_sliders_repo*),
    where the existing maintainer comment was preserved and slightly expanded.

Files changed (21)

tests/fixtures/generated-archives/.gitignore under: gix-archive,
gix-attributes, gix-blame, gix-command, gix-config, gix-diff,
gix-dir, gix-discover, gix-filter, gix-fsck, gix-ignore, gix-index,
gix-odb, gix-ref, gix-refspec, gix-status, gix-url, gix-worktree,
gix-worktree-state, gix-worktree-stream, gix.

Notes for review

A handful of archives don't have an obviously host-dependent script, so the
comment is the most plausible reason from the surrounding test code rather than
a definitive one:

  • gix-config/make_config_repo.tar (env-var-driven config paths into the
    generated worktree)
  • gix-command/win_path_lookup.tar (the rationale here is the weakest of the
    bunch; if it turns out the archive can be committed, removing the
    exclusion is now a one-line follow-up)
  • gix-blame/make_blame_repo*.tar (version-sensitive git blame --porcelain
    baselines under .git/*.baseline)

If any of these should be re-tracked instead of explained, that's a cheaper
change to make on top of this PR than to gate it on.


🤖 Drafted by an AI agent (Claude Code) on behalf of the author, per
CONTRIBUTING.md's AI-disclosure guidance. Each comment was checked against
the corresponding fixture script and the relevant test code before commit.

Closes GitoxideLabs#2316.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
Copy link
Copy Markdown
Member

@Byron Sebastian Thiel (Byron) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

I read through all the comments, made a couple of changes, and think that while not all may be 100% correct, I don't know any better by now and these comments are better than nothing.

They also set the expectation that future additions to the .gitignore files will require comments, which is the right thing to do.

@Byron Sebastian Thiel (Byron) merged commit 4743361 into GitoxideLabs:main May 6, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indicating why each fixture archive in .gitignore is untracked

3 participants