Skip to content

fix: fix readTree error#2248

Merged
jcubic merged 2 commits intoisomorphic-git:mainfrom
xiaoboost:fix/fix-readTree-error
Nov 21, 2025
Merged

fix: fix readTree error#2248
jcubic merged 2 commits intoisomorphic-git:mainfrom
xiaoboost:fix/fix-readTree-error

Conversation

@xiaoboost
Copy link
Contributor

@xiaoboost xiaoboost commented Nov 21, 2025

In some cases, the absence of this cache argument causes internal functions to fail when attempting to read the cache——
https://github.com/isomorphic-git/isomorphic-git/blob/main/src/storage/readPackIndex.js#L25

I'm fixing a bug or typo

  • if this is your first time contributing, run npm run add-contributor and follow the prompts to add yourself to the README
  • squash merge the PR with commit message "fix: [Description of fix]"

Summary by CodeRabbit

  • Chores
    • Added xiaoboost as a new contributor with contributions to code, documentation, and tests
    • Updated the contributors acknowledgment table in documentation

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 21, 2025

Walkthrough

This pull request adds a new contributor named "xiaoboost" to the project. The contributor configuration file is updated with the new contributor's details, the README contributors table is reorganized to reflect the changes, and an internal function parameter is modified to propagate caching functionality through the removeNote command.

Changes

Cohort / File(s) Summary
Contributor Data Updates
.all-contributorsrc
Added placeholder entries and a new contributor object for "xiaoboost" with login, name, avatar URL, profile link, and contribution types (code, doc, test).
Documentation Updates
README.md
Reordered and expanded the Contributors table, repositioning existing entries (Patrick Kranz, Bekatan Satyev) and adding new contributor entries including xiaoboost with avatars and links.
Internal Implementation
src/commands/removeNote.js
Forwarded the cache parameter to the _readTree function call by adding the cache property to function arguments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify that the new contributor entry in .all-contributorsrc is correctly formatted JSON with valid URLs and contribution types
  • Confirm that the README table markdown formatting is preserved and contributor entries are correctly aligned
  • Ensure the cache parameter forwarding in removeNote.js matches the expected function signature and parameter names

Poem

A rabbit hops through contributor lands 🐰
Adding xiaoboost to our growing bands,
With code and docs and tests so fine,
The cache now flows through each line,
Our community table realigns!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: fix readTree error' is directly related to the main code change in src/commands/removeNote.js, which forwards the cache parameter into the _readTree call to fix a readTree issue.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.all-contributorsrc (1)

779-861: Deduplicate repeated contributor objects; new xiaoboost entry looks good

The contributors array currently contains two identical blocks for the same set of logins (LokiMidgard, lukecotter, tomlarkworthy, kofta999, ARBhosale, gnillev, acandoo) between Lines 781–850 and again between Lines 852–921. Keeping both will cause each of these contributors to be rendered twice in the README contributors table.

I’d suggest removing one of the duplicate blocks so that each login appears only once in this file, then re-running the all‑contributors tooling to regenerate the README.

The new xiaoboost contributor object at Lines 962–971 (login, name, avatar_url, profile, contributions) is consistent with the existing schema and matches the README entry.

Also applies to: 960-971

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49555a2 and f50e63b.

📒 Files selected for processing (3)
  • .all-contributorsrc (2 hunks)
  • README.md (1 hunks)
  • src/commands/removeNote.js (1 hunks)
🔇 Additional comments (1)
src/commands/removeNote.js (1)

54-59: Forwarding cache into _readTree correctly wires the caching path

Passing cache into _readTree aligns _removeNote with other commands that propagate the shared cache down to tree/object helpers, and it plausibly fixes the reported readTree error when cache was previously missing. The change is minimal, local, and preserves existing behavior aside from enabling caching.

Comment on lines +388 to +410
<td align="center"><a href="https://github.com/LokiMidgard"><img src="https://avatars.githubusercontent.com/u/389101?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Patrick Kranz</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=LokiMidgard" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=LokiMidgard" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=LokiMidgard" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/lukecotter"><img src="https://avatars.githubusercontent.com/u/4013877?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Luke Cotter</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=lukecotter" title="Code">💻</a></td>
<td align="center"><a href="https://tomlarkworthy.endpointservices.net/"><img src="https://avatars.githubusercontent.com/u/1848162?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Tom Larkworthy</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=tomlarkworthy" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/kofta999"><img src="https://avatars.githubusercontent.com/u/99273340?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Mostafa Mahmoud</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=kofta999" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=kofta999" title="Tests">⚠️</a> <a href="#question-kofta999" title="Answering Questions">💬</a></td>
<td align="center"><a href="https://github.com/ARBhosale"><img src="https://avatars.githubusercontent.com/u/26981417?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Aniket Bhosale</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ARBhosale" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ARBhosale" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ARBhosale" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/gnillev"><img src="https://avatars.githubusercontent.com/u/8965094?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Mathias Nisted Velling</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=gnillev" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=gnillev" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/acandoo"><img src="https://avatars.githubusercontent.com/u/117209328?v=4?s=60" width="60px;" alt=""/><br /><sub><b>acandoo</b></sub></a><br /><a href="#platform-acandoo" title="Packaging/porting to new platform">📦</a> <a href="#userTesting-acandoo" title="User Testing">📓</a></td>
<td align="center"><a href="https://github.com/LokiMidgard"><img src="https://avatars.githubusercontent.com/u/389101?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Patrick Kranz</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=LokiMidgard" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=LokiMidgard" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=LokiMidgard" title="Tests">⚠️</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/LokiMidgard"><img src="https://avatars.githubusercontent.com/u/389101?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Patrick Kranz</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=LokiMidgard" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=LokiMidgard" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=LokiMidgard" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/lukecotter"><img src="https://avatars.githubusercontent.com/u/4013877?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Luke Cotter</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=lukecotter" title="Code">💻</a></td>
<td align="center"><a href="https://tomlarkworthy.endpointservices.net/"><img src="https://avatars.githubusercontent.com/u/1848162?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Tom Larkworthy</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=tomlarkworthy" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/kofta999"><img src="https://avatars.githubusercontent.com/u/99273340?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Mostafa Mahmoud</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=kofta999" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=kofta999" title="Tests">⚠️</a> <a href="#question-kofta999" title="Answering Questions">💬</a></td>
<td align="center"><a href="https://github.com/ARBhosale"><img src="https://avatars.githubusercontent.com/u/26981417?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Aniket Bhosale</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ARBhosale" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ARBhosale" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ARBhosale" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/gnillev"><img src="https://avatars.githubusercontent.com/u/8965094?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Mathias Nisted Velling</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=gnillev" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=gnillev" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/acandoo"><img src="https://avatars.githubusercontent.com/u/117209328?v=4?s=60" width="60px;" alt=""/><br /><sub><b>acandoo</b></sub></a><br /><a href="#platform-acandoo" title="Packaging/porting to new platform">📦</a> <a href="#userTesting-acandoo" title="User Testing">📓</a></td>
<td align="center"><a href="https://github.com/bekatan"><img src="https://avatars.githubusercontent.com/u/19550476?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Bekatan Satyev</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=bekatan" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=bekatan" title="Tests">⚠️</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/bekatan"><img src="https://avatars.githubusercontent.com/u/19550476?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Bekatan Satyev</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=bekatan" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=bekatan" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/hemanthkini"><img src="https://avatars.githubusercontent.com/u/3934055?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Hemanth Kini</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hemanthkini" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/anish3333"><img src="https://avatars.githubusercontent.com/u/128889867?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Anish Awasthi</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=anish3333" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=anish3333" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=anish3333" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/fetsorn"><img src="https://avatars.githubusercontent.com/u/12858105?v=4?s=60" width="60px;" alt=""/><br /><sub><b>fetsorn</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=fetsorn" title="Documentation">📖</a></td>
<td align="center"><a href="http://www.dreamingcat.me/"><img src="https://avatars.githubusercontent.com/u/7752883?v=4?s=60" width="60px;" alt=""/><br /><sub><b>xiaoboost</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=xiaoboost" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=xiaoboost" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=xiaoboost" title="Tests">⚠️</a></td>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Duplicate contributor row for the same set of logins

The contributor row starting at Line 388 and the row starting at Line 397 list the exact same 7 contributors (LokiMidgard, lukecotter, tomlarkworthy, kofta999, ARBhosale, gnillev, acandoo). That will display them twice in the README table and appears unintentional.

Since this table is generated from .all-contributorsrc, I recommend deduplicating those logins in .all-contributorsrc and then re-running the all‑contributors tooling so each contributor appears only once in the README.

🤖 Prompt for AI Agents
In README.md around lines 388 to 410 there is a duplicated contributor row (the
same seven logins repeated); remove the duplicate entry by editing
.all-contributorsrc to ensure each login appears only once (or delete the
duplicated block from README.md if you prefer a one-off fix), then re-run the
all‑contributors CLI to regenerate the README so contributors are listed once.

@jcubic jcubic merged commit 24f7cc9 into isomorphic-git:main Nov 21, 2025
4 checks passed
@jcubic
Copy link
Member

jcubic commented Nov 21, 2025

Thanks for the fix.

@xiaoboost xiaoboost deleted the fix/fix-readTree-error branch November 21, 2025 13:23
@isomorphic-git-bot
Copy link
Member

🎉 This PR is included in version 1.35.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments