Skip to content

Fix VCSTURD when git refs are packed#47

Open
ransford wants to merge 1 commit into
masterfrom
fix-packed-refs-vcsturd
Open

Fix VCSTURD when git refs are packed#47
ransford wants to merge 1 commit into
masterfrom
fix-packed-refs-vcsturd

Conversation

@ransford
Copy link
Copy Markdown
Owner

Summary

  • After git pack-refs, the loose ref file (e.g., .git/refs/heads/master) is removed and refs are stored in .git/packed-refs instead. This caused $(VCSTURD) to reference a nonexistent file, breaking the revision.tex target.
  • Uses $(wildcard ...) to check if the loose branch ref exists, falling back to .git/packed-refs when it doesn't.

Fixes #46

Test plan

  • Run git pack-refs --all in a repo using this Makefile, verify make still produces revision.tex
  • Verify normal (non-packed) repos continue to work as before

🤖 Generated with Claude Code

After `git pack-refs`, the loose ref file (e.g., .git/refs/heads/master)
is removed and refs are stored in .git/packed-refs instead. This caused
VCSTURD to reference a nonexistent file, breaking the revision.tex target.

Fall back to .git/packed-refs when the loose branch ref does not exist.

Fixes #46

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

git pack removes file path of VCSTURD

1 participant