Walk through re-imported history behind a root commit - #39
Merged
Merged
Conversation
A root commit can re-import the files of an older history that is only reachable through a later merge's second parent. SourceMod's mainline starts at 251cced (2008-03-30), a snapshot identical to 3a14544 in the SVN history, which is joined back in by the 2008-09 "Eliminated head" merges. Following first parents stopped at the snapshot, dating 1,581 symbols (e.g. PrintToChat, added 2007-06-01) to 2008-03-30. When the first-parent walk reaches a root, continue from the latest older commit elsewhere in HEAD's history whose matching files are identical, diffing each commit against the previous one walked. A root with no such predecessor is still compared against an empty tree. The rev-list count restarts from the root's own count after the predecessor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UmDZ8MBYNvgeQ52tpsJe3t
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.
Follow-up to #31, fixing a regression it introduced for SourceMod.
Problem
SourceMod has three root commits. The mainline (first parent from HEAD) starts at
251cced(2008-03-30, "Spring Cleaning"). Itsplugins/includeis identical to3a14544(2008-03-28) in the older SVN history. That older history only reconnects as the second parent of the 2008-09 "Eliminated head" merges.After #31 the walk followed first parents only, so it stopped at the snapshot:
PrintToChatwas really added 2007-06-01 (6c17b9f),GetClientName2007-02-27, andHookEvent2007-03-04.Change
PrintToChatis created at count 872, before251ccedat count 1), because that is whatgit rev-list --countreports for those commits.Verification
update-corpus.shinclude patterns) and compared every symbol, nested ones included, against a reference that uses thegitCLI. All 5,252 symbols match on created, last updated and count, with no missing or extra symbols. SourceMod now walks 1,133 changing commits instead of 713.PrintToChat,GetClientNameandHookEventare back to their 2007 commits.GetClientAuthIdstays at the #147 merge (count 4830).Bundles generated after #31 should be regenerated from scratch (without
-b).🤖 Generated with Claude Code
https://claude.ai/code/session_01UmDZ8MBYNvgeQ52tpsJe3t
Generated by Claude Code