Skip to content

MINOR: Fix Gradle when git refs are packed#14590

Closed
nicktelford wants to merge 1 commit intoapache:trunkfrom
nicktelford:fix-gradle-commit-id-packed-refs
Closed

MINOR: Fix Gradle when git refs are packed#14590
nicktelford wants to merge 1 commit intoapache:trunkfrom
nicktelford:fix-gradle-commit-id-packed-refs

Conversation

@nicktelford
Copy link
Copy Markdown
Contributor

When git gc runs, which can run automatically on large repos like Kafka, it packs all refs under .git/refs/heads into a single .git/packed-refs file.

When this happens, the Gradle build can no longer locate the ref in .git/refs/heads that it expects.

We fix this by having Gradle also search for the .git/packed-refs file if it cannot find the ref in .git/refs/heads.

When `git gc` runs, which can run automatically on large repos like
Kafka, it packs all refs under `.git/refs/heads` into a single
`.git/packed-refs` file.

When this happens, the Gradle build can no longer locate the ref in
`.git/refs/heads` that it expects.

We fix this by having Gradle also search for the `.git/packed-refs`
file if it cannot find the ref in `.git/refs/heads`.
@ijuma
Copy link
Copy Markdown
Member

ijuma commented Oct 22, 2023

Is this still needed after #13315?

@nicktelford
Copy link
Copy Markdown
Contributor Author

@ijuma I didn't see the other PR, that looks like a better solution.

@nicktelford nicktelford deleted the fix-gradle-commit-id-packed-refs branch October 23, 2023 13:23
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.

2 participants