mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4390] [Other] update.sh: on any clone whose remote has no main, every failed pull is misdiagnosed as old history #1953
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1953
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TheHubUser4860938 on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4390
Problem: update.sh gates its "old history" recovery on
! git merge-base HEAD origin/main(line 20). The condition was meant for "no commit in common with origin/main" — but it is equally true whenorigin/mainDOES NOT EXIST: merge-base then exits 128. So on a source FORK whose remote has no main branch (any fork tracking its own default branch — e.g. memory-core), every ordinarygit pull --ff-onlyfailure (diverged local commit) takes the old-history path, which then triesgit checkout -B <branch> origin/main(line 43) — a ref that does not exist there.Environment:
Strata Version: 0.2.7 (source checkout at tag v0.2.7, commit
5e8a4cca; the file discussed is byte-identical to the tag)OS: Linux x86-64
Reported from the Strata-Mnemosyne fork's merged tree; the offending code is upstream's own.
Reproduce (measured): live check —
git merge-base HEAD origin/main→fatal: Not a valid object name origin/main, exit 128. Sandbox: bare origin with only branch memory-core, diverged clone →git pull --ff-onlyfails → the old-history branch is entered, a spurious pre-cleanup-backup branch is made and removed, and the remedy fails with exit 128 ('origin/main' is not a commit) → update.sh exits 1 with "Could not move to the new history".Expected: distinguish "no common history" from "origin/main is absent here" (or use the real upstream ref), and name the actual remedy (merge/rebase the current branch).
Actual: an ordinary divergence on a fork reads as a corrupt clone.
Reproduction status: the condition and the failing remedy measured in a sandbox bare-origin clone; the Windows .bat twin of the same logic not checked.
@Nyarlathoteppppp commented on GitHub (Oct 29, 2026):
I have a fix with a regression test that fails before and passes after; opening a PR shortly.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.