Query regarding git-scm should return documentation about it
When using Claude Code, I if I have mcp__ref in my allowed tools. In this instance I noticed that a request to look up git behavior did not return information from git-scm as I expected, but an alternative git implementation. The following is the prompt, and then the response:
<prompt>
> Confirm for me one question about the necessity for a security procedure. Imagine the scenario:
- I have a .gitignore with `.envrc` ignored
- I create a new file called `.envrc`
- Would the simple `git add "$1"` version of the script add the new `.envrc` DESPITE being git-ignored?
Use the Git manual to confirm and quote the relevant manual text.
</prompt>
<response>
ref - ref_search_documentation (MCP)(query: "git add behavior with gitignore ignored files manual
documentation", keyWords:
["git","add","gitignore","ignored","files","manual"])
⎿ moduleId: github::isomorphic-git/isomorphic-git
url: https://github.com/isomorphic-git/isomorphic-git/blob/main/website/versioned_docs/version-1.x/add.md?plai
n=1#L1#entire-document
-----
---
title: add
sidebar_label: add
id: version-1.x-add
original_id: add
---
Add a file to the git index (aka staging area)
| param | type [= default] | description
|
| -------------- | ------------------------------- | ---------------------------------------------------------
------------------------------------------------------------ |
| [**fs**](./fs) | FsClient | a file system implementation
|
| **dir** | string | The [working tree](dir-vs-gitdir.md) directory path
|
| **gitdir** | string = join(dir, '.git') | The [git directory](dir-vs-gitdir.md) path
|
| **filepath** | string | Array\<string\> | The path to the file to add to the index
|
| cache | object | a [cache](cache.md) object
|
| force | boolean = false | add to index even if matches gitignore. Think `git add
--force` |
| parallel | boolean = false | process each input file in parallel. Parallel processing
will result in more memory consumption but less process time |
| return | Promise\<void\> | Resolves successfully once the git index has been updated
|
Example Code:
```js live
await fs.promises.writeFile('/tutorial/README.md', `# TEST`)
await git.add({ fs, dir: '/tutorial', filepath: 'README.md' })
console.log('done')
```
---
<details>
<summary><i>Tip: If you need a clean slate, expand and run this snippet to clean up the file
system.</i></summary>
```js live
window.fs = new LightningFS('fs', { wipe: true })
window.pfs = window.fs.promises
console.log('done')
```
</details>
<script>
(function rewriteEditLink() {
const el = document.querySelector('a.edit-page-link.button');
if (el) {
el.href = 'https://github.com/isomorphic-git/isomorphic-git/edit/main/src/api/add.js';
}
})();
</script>
⎿ moduleId: github::isomorphic-git/isomorphic-git
url: https://github.com/isomorphic-git/isomorphic-git/blob/main/website/versioned_docs/version-0.70.7/add.md?p
lain=1#L1#entire-document
-----
---
title: add
sidebar_label: add
id: version-0.70.7-add
original_id: add
---
</response>
I think the expected behavior in this case would be to have found https://github.com/git/git-scm.com instead. What do you think?
Thanks!
Hi Kyle thanks for writing in! I'm also surprised by this too. I've added it to the eval set and will let you know what I turn up. 👍
Just read the new blog post. Sounds like you're making progress! 👏
Hi Kyle yes indeed, this should work better now. And thanks for commenting I forgot to come back and close the ticket. Of course feel free to reopen if you're still having issues. :)