Skip to content

fix: use git add -u in merge script to avoid orphaned gitlinks#1133

Merged
ktdreyer merged 1 commit intoalphafrom
fix/merge-script-git-add-1131
Apr 1, 2026
Merged

fix: use git add -u in merge script to avoid orphaned gitlinks#1133
ktdreyer merged 1 commit intoalphafrom
fix/merge-script-git-add-1131

Conversation

@ktdreyer
Copy link
Copy Markdown
Contributor

@ktdreyer ktdreyer commented Apr 1, 2026

Summary

  • Replace git add -A with git add -u in scripts/rebase-main-to-alpha.sh (both occurrences on lines 67 and 87)
  • git add -A stages all untracked content, including stray cloned repositories in the worktree, which get recorded as orphaned gitlinks that break ArgoCD sync
  • git add -u only stages changes to already-tracked files, which is the correct behavior during conflict resolution

Fixes #1131

"git add -A" stages all untracked content, including stray
cloned repositories that happen to exist in the worktree.
These get recorded as orphaned gitlinks, which break ArgoCD
sync because the referenced submodule commits do not exist
in the remote.

"git add -u" limits staging to already-tracked files, which
is the correct intent during conflict resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 640e2681-c55a-4dac-bedc-049b10e6fb36

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/merge-script-git-add-1131

Comment @coderabbitai help to get the list of available commands and usage tips.

@ktdreyer
Copy link
Copy Markdown
Contributor Author

ktdreyer commented Apr 1, 2026

Auto reviews are disabled on base/target branches other than the default branch.

Filed #1134 to improve that.

@ktdreyer ktdreyer requested a review from markturansky April 1, 2026 15:36
Copy link
Copy Markdown
Contributor

@markturansky markturansky left a comment

Choose a reason for hiding this comment

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

LGTM

@ktdreyer ktdreyer merged commit b2b353c into alpha Apr 1, 2026
6 checks passed
@ktdreyer ktdreyer deleted the fix/merge-script-git-add-1131 branch April 1, 2026 15:42
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