Skip to content

[ocl-open-170] Apply patches with git apply when no .git history is present - #881

Open
wenju-he wants to merge 1 commit into
intel:ocl-open-170from
wenju-he:apply-patches-without-git-tree
Open

[ocl-open-170] Apply patches with git apply when no .git history is present#881
wenju-he wants to merge 1 commit into
intel:ocl-open-170from
wenju-he:apply-patches-without-git-tree

Conversation

@wenju-he

Copy link
Copy Markdown
Contributor

Sources extracted from a tarball (e.g. Nix, or other reproducible builds that avoid full git clones of llvm-project) have no .git directory, so the existing git-am/branch-based patching silently skipped all patches. Fall back to plain git apply, which only needs the working tree content to match the patch context and works without any git repository or history. Idempotency across reconfigures is tracked with a marker file instead of a git branch.

Sources extracted from a tarball (e.g. Nix, or other reproducible
builds that avoid full git clones of llvm-project) have no .git
directory, so the existing git-am/branch-based patching silently
skipped all patches. Fall back to plain `git apply`, which only
needs the working tree content to match the patch context and
works without any git repository or history. Idempotency across
reconfigures is tracked with a marker file instead of a git branch.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@wenju-he wenju-he changed the title Apply patches with git apply when no .git history is present [ocl-open-170] Apply patches with git apply when no .git history is present Aug 24, 2026
@wenju-he
wenju-he enabled auto-merge (squash) August 24, 2026 04:19
@wenju-he
wenju-he requested a review from cdai2 August 24, 2026 04:19
@wenju-he
wenju-he disabled auto-merge August 24, 2026 04:19

@cdai2 cdai2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.
Is there a test to cover this case? I believe there isn't one currently.

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