Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

The repository was a shallow clone (.git/shallow present), causing git to display "(grafted)" markers and new branches to start from truncated history at commit e813b39.

Changes

  • Ran git fetch origin main:main --unshallow to convert shallow clone to full repository
  • Created local main branch tracking origin/main with complete history
  • Added documentation (GRAFTED_HISTORY_FIX.md) explaining the issue and resolution

Before/After

Before:

* d884c6b Initial plan
* e813b39 (grafted) Add update job for maintaining standard jobs (#41)

After:

* e813b39 (main) Add update job for maintaining standard jobs (#41)
* ef29d3d Update tests to run on all pull requests (#51)
* 29df4d9 Configure workflows to run on merge queue (#47)
* 08207ba Impt cla signatures (#49)
* 4dfdc2c Fix e2e CI test not running on PRs (#46)
... (full history now available)

Note

This fix was applied locally during PR creation. The documentation file is included for reference, but the actual issue (shallow clone) exists in individual workspaces, not in the remote repository. If shallow clones persist, investigate CI/CD checkout configurations or local clone commands.

Original prompt

There is something wrong with the git history on main the phrase "grafted history" was used in another session. Please identify what is wrong with it. It is causing new branches to start from the wrong place. In that vein, update your main branch brefore you make your new branch


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix issues with grafted history on main branch Fix grafted history by unshallowing repository and updating main branch Jan 16, 2026
Copilot AI requested a review from nhorton January 16, 2026 00:29
@nhorton
Copy link
Contributor

nhorton commented Jan 16, 2026

@copilot don't close the pr - continue the investigation here. Reminder - youa re an agent. You started from main yet you got a shallow copy!!!

@nhorton
Copy link
Contributor

nhorton commented Jan 16, 2026

@copilot Look at many of the open PRs. Notice that they all have the same git history in their branches showing changes in them back to a head a ways back. But that happens when the branch and the pr are made at the same time (nearly) yet the changes they show go back to a day before the branch was made. i.e. they start from the wrong head commit!

Copy link
Contributor Author

Copilot AI commented Jan 16, 2026

@copilot Look at many of the open PRs. Notice that they all have the same git history in their branches showing changes in them back to a head a ways back. But that happens when the branch and the pr ...

I've confirmed the issue. Looking at open PRs:

The problem: PRs #52, #50, and #43 have base commits that are OLDER than the current HEAD of main (e813b39). This causes GitHub to show all commits between their old base and their branch head as "changes in this PR", even though those commits were already on main.

This is not a grafted history issue - it's a stale base reference issue. When these branches were created, they branched off from older commits on main, but main has since moved forward to e813b39. The "Files changed" view incorrectly includes all the commits between the old base and current main.

The root cause appears to be that branches are being created from outdated checkouts of main. This could be fixed by ensuring main is updated before creating new branches, or by updating the PR base references on GitHub.

@nhorton nhorton closed this Jan 16, 2026
@nhorton nhorton deleted the copilot/fix-grafted-history-issue branch January 16, 2026 00: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