fix(ci): remove --depth=1 from legacy guard base fetch - #1769
Merged
Conversation
The fetch-depth: 0 checkout fetches full PR branch history, but git fetch origin main --depth=1 creates a shallow reference for origin/main with only 1 commit. This breaks git diff --name-status origin/main...HEAD because git can't find the merge base. Remove --depth=1 so origin/main has enough history to compute the three-dot diff against HEAD. Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
📝 WalkthroughWalkthroughA workflow step in the GitHub Actions pipeline is modified to remove the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
cv
approved these changes
Apr 10, 2026
ericksoa
pushed a commit
to cheese-head/NemoClaw
that referenced
this pull request
Apr 14, 2026
## Summary The `legacy-path-guard` CI job fails on every PR with `fatal: origin/main...HEAD: no merge base`. **Root cause:** The checkout uses `fetch-depth: 0` (full PR history), but then `git fetch origin main --depth=1` creates a shallow reference for `origin/main` with only 1 commit. Git can't find a merge base between the shallow main ref and HEAD. **Fix:** Remove `--depth=1` from the base branch fetch so origin/main has enough history for the three-dot diff. ## Related Introduced in NVIDIA#1683 ## Test plan - [ ] This PR's own `legacy-path-guard` job passes (self-validating) Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated internal CI/CD workflow configuration to improve git history fetching for automated checks. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
legacy-path-guardCI job fails on every PR withfatal: origin/main...HEAD: no merge base.Root cause: The checkout uses
fetch-depth: 0(full PR history), but thengit fetch origin main --depth=1creates a shallow reference fororigin/mainwith only 1 commit. Git can't find a merge base between the shallow main ref and HEAD.Fix: Remove
--depth=1from the base branch fetch so origin/main has enough history for the three-dot diff.Related
Introduced in #1683
Test plan
legacy-path-guardjob passes (self-validating)Signed-off-by: Prekshi Vyas prekshiv@nvidia.com
🤖 Generated with Claude Code
Summary by CodeRabbit