You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
User misattributed in CHANGELOG using @changesets/changelog-github #2272
I found out that the issue is the --follow parameter of the git log command, which was added in this PR to improve commit lookups when the changeset file was renamed. The --follow option tells git to keep iterating upwards over the commit tree if it considers the file changes in a commit as a rename or copy of a previous commit.
Detailed explanation of what happened in that Starlight example
Here is what happened in that special Starlight case (and it is kinda funny IMHO): The two changeset files in question are very similar in content -- only the icon key is different. Coincidentally, the file names olive-donuts-repeat.md (hypothesis) and open-planets-tap.md (npmx) are also kinda similar 😆
Now hear me out: When @changeset/git's getCommitsThatAddFiles function ran these git commands:
[!NOTE]
I added some escape characters to the git outputs to prevent linking to non-existent PRs in this repo.
Additionally, I included the -- separator in the git log commands before the file name, which is also missing in the code.
Now the question is: Do we simply remove the --follow option to fix the issue and remove the "rename tracking" feature that it added. Or should we add the --find-renames=100% option to only follow commits if the content stayed 100% the same?
Activity
trueberryless commentedon Aug 28, 2026
trueberryless commentedon Aug 29, 2026
Thanks for the report, Chris!
I found out that the issue is the
--followparameter of thegit logcommand, which was added in this PR to improve commit lookups when the changeset file was renamed. The--followoption tells git to keep iterating upwards over the commit tree if it considers the file changes in a commit as a rename or copy of a previous commit.Detailed explanation of what happened in that Starlight example
Here is what happened in that special Starlight case (and it is kinda funny IMHO): The two changeset files in question are very similar in content -- only the icon key is different. Coincidentally, the file names
olive-donuts-repeat.md(hypothesis) andopen-planets-tap.md(npmx) are also kinda similar 😆Now hear me out: When
@changeset/git'sgetCommitsThatAddFilesfunction ran these git commands:git log --diff-filter=A --follow --max-count=1 --pretty=format:%H:%p -- .changeset/olive-donuts-repeat.mdgit log --diff-filter=A --follow --max-count=1 --pretty=format:%H:%p -- .changeset/open-planets-tap.mdgit interpreted the
HEADcommit as a rename of the parent commit, which lead to the wrong association:Removing the
--followparameter means that git does not track renames/copies, which results in the correct lookups:Now the question is: Do we simply remove the
--followoption to fix the issue and remove the "rename tracking" feature that it added. Or should we add the--find-renames=100%option to only follow commits if the content stayed 100% the same?