{"versions":{"1.0.0":{"name":"find-gitdir","version":"1.0.0","description":"Find .git directory with support of submodules and --separate-git-dir","license":"MIT","author":{"name":"Vincent Weevers"},"scripts":{"test":"standard && nyc node test"},"dependencies":{"catering":"^2.0.0","find-file-up":"^2.0.1"},"devDependencies":{"nyc":"^15.1.0","standard":"^16.0.3","tape":"^5.0.1","tempy":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/vweevers/find-gitdir.git"},"homepage":"https://github.com/vweevers/find-gitdir","keywords":["directory","find","git","gitdir","submodules"],"engines":{"node":">=10"},"gitHead":"265462a949ae7b80646a5984017635a15850b703","bugs":{"url":"https://github.com/vweevers/find-gitdir/issues"},"_id":"find-gitdir@1.0.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","_npmUser":{"name":"anonymous","email":"dev@vincentweevers.nl"},"maintainers":[{"name":"anonymous","email":"dev@vincentweevers.nl"}],"dist":{"integrity":"sha512-j53QvISShOXBPGoKQXH0JqXvU3tEfO5UpbkI5NlYUcTQuUSv7O03cQTJcr/LkBdKG0d2Mh34jQv2+d3Mv33JGw==","shasum":"9d08db94bfb9daa8277ff2afd22a72d102241bbe","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/find-gitdir/-/find-gitdir-1.0.0.tgz","fileCount":4,"unpackedSize":5423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwr++CRA9TVsSAnZWagAA1KQP/34utWukKLt4//m1ebQL\ncOPXgKL4QxeX00XmncBSGGIWeTbBAftyPDUZP5BIHBWGKV2lihjv9PCLrXIH\nXjrdSBdsfMsZrwyjmU3dxUZWtzWK/BWXLgInLHzvl+XqWSYqxYjm1nc+bYGd\n/MlpHmkxWRWS0K7yQkvwa5GWGpTicJervWQPwUGzRzr9JFuu7uhoyu40CPvk\nwrTlM7C6+chCQmxy5j+W7g/2E1tpV4TtADjSWmPivjNX7zg+MePUmPvrGS8x\nORtyXUn0RudWIgtTPGcDfHGX9dkW0JuJIoLjZ8Srrs2HyYx1lT7LzU1UZRYi\nIw53z7E6leUMkACQ9lbeEZ0JsyTV+dffdKDTFhTr7LDPDt6dlImOtaPuIH1F\nfwlJRXaKEJC1Y4z31TOxkhNU5+WMzHIij/x8nfZQ1OktT1WPmpkxfFqGOb6l\ni1xDDG/OdrV3sHs0JDFRc6FQ6Fc8N/E5EYlLlhnB/3UoUHblcGc2FSYTbd9c\nWdMEGduytrjFG8GJWqd7Jm4NAeQ8MLNk+THkNH3WVXCzZWl2RWPNZUbcvBpK\nYj+vFxqNmhtwz20vVCbR3bS/sTQhKVBjfZHzBqPcKzUBND3MOakO6erNzZgG\nkIH9yjxuBkbamUk4YaY5tyILRMt/iXa0zVLsBiQpypUkW7MJAUjfIYEmKnIt\n0oLd\r\n=A9fU\r\n-----END PGP SIGNATURE-----\r\n","size":2500},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-gitdir_1.0.0_1606598590176_0.7048243128007747"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-21T21:36:31.593Z","contributors":[]},"1.1.0":{"name":"find-gitdir","version":"1.1.0","description":"Find .git directory with support of submodules and --separate-git-dir","license":"MIT","author":{"name":"Vincent Weevers"},"scripts":{"test":"standard && nyc node test"},"dependencies":{"catering":"^2.0.0","find-file-up":"^2.0.1"},"devDependencies":{"nyc":"^15.1.0","standard":"^17.0.0","tape":"^5.0.1","tempy":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/vweevers/find-gitdir.git"},"homepage":"https://github.com/vweevers/find-gitdir","keywords":["directory","find","git","gitdir","submodules"],"engines":{"node":">=10"},"_id":"find-gitdir@1.1.0","gitHead":"b6e983544668b1600feee91d5dc8b862b77b3230","bugs":{"url":"https://github.com/vweevers/find-gitdir/issues"},"_nodeVersion":"22.7.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-eR8zbL6gvNTX5SPbHFDLj65iF4Y+ZoSgyhOgYLbdjAzO4htAIGW9I60ySbZy9r6RJNaer3oiZKlLkLqPzUl+lA==","shasum":"7c30b9f560bfd4c4238309da4ecad7ba11ef8e15","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/find-gitdir/-/find-gitdir-1.1.0.tgz","fileCount":4,"unpackedSize":8071,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE+ZiGZJb3KsWQThsV3F1FySWlnpkzk6/duuUgnGJPfZAiEAjKpZNBKaOm3C9RH4Vq2/h+NzevZZE59wk5tNM4vII4c="}],"size":3236},"_npmUser":{"name":"anonymous","email":"dev@vincentweevers.nl"},"directories":{},"maintainers":[{"name":"anonymous","email":"dev@vincentweevers.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/find-gitdir_1.1.0_1760707898550_0.9560271428763141"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-17T13:31:38.744Z","publish_time":1760707898744,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"1.1.0"},"name":"find-gitdir","time":{"created":"2022-01-27T22:13:40.217Z","modified":"2025-10-17T13:31:59.373Z","1.0.0":"2020-11-28T21:23:10.288Z","1.1.0":"2025-10-17T13:31:38.744Z"},"readme":"# find-gitdir\n\n**Find `.git` directory with support of submodules, [`--separate-git-dir`](https://git-scm.com/docs/git-init#Documentation/git-init.txt---separate-git-dirltgitdirgt) and [linked worktrees](https://git-scm.com/docs/git-worktree).**\n\n[![npm status](http://img.shields.io/npm/v/find-gitdir.svg)](https://www.npmjs.org/package/find-gitdir)\n[![node](https://img.shields.io/node/v/find-gitdir.svg)](https://www.npmjs.org/package/find-gitdir)\n![Test](https://github.com/vweevers/find-gitdir/workflows/Test/badge.svg?branch=main)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Usage\n\n```js\nconst gitdir = require('find-gitdir')\n```\n\nLet's say we have a git repository at `/example` and that this is our working directory. Its gitdir will commonly be at `/example/.git`.\n\n```js\nawait gitdir() // /example/.git\n```\n\nLet's also say we have a git submodule at `./beep`. Then `find-gitdir` will find a symbolic link at `./beep/.git` pointing to the gitdir `../.git/modules/beep`:\n\n```js\nawait gitdir('./beep') // /example/.git/modules/beep\n```\n\nBy default `find-gitdir` does not look in parent directories. It can be enabled:\n\n```js\nawait gitdir('./node_modules/find-gitdir')       // null\nawait gitdir('./node_modules/find-gitdir', { roam: true }) // /example/.git\n```\n\n## API\n\n### `gitdir([cwd][, options][, callback])`\n\nYields an absolute path to a `.git` directory or `null` if not found, given working directory `cwd` which defaults to `process.cwd()`. If no callback if provided, a promise is returned. Options:\n\n- `roam` (boolean, default `false`): enable looking in parent directories\n- `common` (boolean, default `false`): if `cwd` is a [linked worktree](https://git-scm.com/docs/git-worktree) then return the gitdir of the main worktree (a.k.a. [`$GIT_COMMON_DIR`](https://git-scm.com/docs/gitrepository-layout)) instead of the gitdir of the linked worktree. This can be useful if you need non-worktree files like `config`.\n\nIf `options` is a boolean, it is interpreted as `options.roam` for backwards compatibility.\n\n### `gitdir.sync([cwd][, options])`\n\nSynchronous variant. Returns an absolute path or `null`.\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install find-gitdir\n```\n\n## License\n\n[MIT](LICENSE) © Vincent Weevers","users":{}}