Title: [Regression] Worktree support · Issue #1777 · pre-commit/pre-commit · GitHub
Open Graph Title: [Regression] Worktree support · Issue #1777 · pre-commit/pre-commit
X Title: [Regression] Worktree support · Issue #1777 · pre-commit/pre-commit
Description: Latest release 2.9.3 broke git worktrees support version information pre-commit version: 2.9.3 sys.version: 3.6.8 (default, Apr 15 2020, 09:32:35) [GCC 9.3.0] sys.executable: /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv...
Open Graph Description: Latest release 2.9.3 broke git worktrees support version information pre-commit version: 2.9.3 sys.version: 3.6.8 (default, Apr 15 2020, 09:32:35) [GCC 9.3.0] sys.executable: /home/vampas/.dotfiles...
X Description: Latest release 2.9.3 broke git worktrees support version information pre-commit version: 2.9.3 sys.version: 3.6.8 (default, Apr 15 2020, 09:32:35) [GCC 9.3.0] sys.executable: /home/vampas/.dotfiles...
Opengraph URL: https://github.com/pre-commit/pre-commit/issues/1777
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Regression] Worktree support","articleBody":"Latest release 2.9.3 broke git worktrees support\r\n\r\n### version information\r\n\r\n```\r\npre-commit version: 2.9.3\r\nsys.version:\r\n 3.6.8 (default, Apr 15 2020, 09:32:35)\r\n [GCC 9.3.0]\r\nsys.executable: /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/bin/python3.6\r\nos.name: posix\r\nsys.platform: linux\r\n```\r\n\r\n### error information\r\n\r\n```\r\nAn error has occurred: FatalError: git toplevel unexpectedly empty! make sure you are not inside the `.git` directory of your repository.\r\n```\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages/pre_commit/error_handler.py\", line 65, in error_handler\r\n yield\r\n File \"/home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages/pre_commit/main.py\", line 330, in main\r\n _adjust_args_and_chdir(args)\r\n File \"/home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages/pre_commit/main.py\", line 147, in _adjust_args_and_chdir\r\n toplevel = git.get_root()\r\n File \"/home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages/pre_commit/git.py\", line 66, in get_root\r\n 'git toplevel unexpectedly empty! make sure you are not '\r\npre_commit.errors.FatalError: git toplevel unexpectedly empty! make sure you are not inside the `.git` directory of your repository.\r\n```\r\n\r\n```\r\n❯ pre-commit run -av bandit-salt\r\nAn error has occurred: FatalError: git toplevel unexpectedly empty! make sure you are not inside the `.git` directory of your repository.\r\nCheck the log at /home/vampas/.cache/pre-commit/pre-commit.log\r\n```\r\nVersion 2.9.2 works fine:\r\n```\r\n❯ pip install pre-commit==2.9.2\r\nCollecting pre-commit==2.9.2\r\n Using cached pre_commit-2.9.2-py2.py3-none-any.whl (184 kB)\r\nRequirement already satisfied: importlib-metadata in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from pre-commit==2.9.2) (3.1.1)\r\nRequirement already satisfied: virtualenv\u003e=20.0.8 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from pre-commit==2.9.2) (20.2.2)\r\nRequirement already satisfied: pyyaml\u003e=5.1 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from pre-commit==2.9.2) (5.3.1)\r\nRequirement already satisfied: nodeenv\u003e=0.11.1 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from pre-commit==2.9.2) (1.5.0)\r\nRequirement already satisfied: cfgv\u003e=2.0.0 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from pre-commit==2.9.2) (3.2.0)\r\nRequirement already satisfied: identify\u003e=1.0.0 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from pre-commit==2.9.2) (1.5.10)\r\nRequirement already satisfied: toml in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from pre-commit==2.9.2) (0.10.2)\r\nRequirement already satisfied: importlib-resources in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from pre-commit==2.9.2) (3.3.0)\r\nRequirement already satisfied: zipp\u003e=0.5 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from importlib-metadata-\u003epre-commit==2.9.2) (3.4.0)\r\nRequirement already satisfied: zipp\u003e=0.5 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from importlib-metadata-\u003epre-commit==2.9.2) (3.4.0)\r\nRequirement already satisfied: importlib-resources in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from pre-commit==2.9.2) (3.3.0)\r\nRequirement already satisfied: six\u003c2,\u003e=1.9.0 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from virtualenv\u003e=20.0.8-\u003epre-commit==2.9.2) (1.15.0)\r\nRequirement already satisfied: filelock\u003c4,\u003e=3.0.0 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from virtualenv\u003e=20.0.8-\u003epre-commit==2.9.2) (3.0.12)\r\nRequirement already satisfied: distlib\u003c1,\u003e=0.3.1 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from virtualenv\u003e=20.0.8-\u003epre-commit==2.9.2) (0.3.1)\r\nRequirement already satisfied: importlib-metadata in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from pre-commit==2.9.2) (3.1.1)\r\nRequirement already satisfied: appdirs\u003c2,\u003e=1.4.3 in /home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages (from virtualenv\u003e=20.0.8-\u003epre-commit==2.9.2) (1.4.4)\r\nInstalling collected packages: pre-commit\r\n Attempting uninstall: pre-commit\r\n Found existing installation: pre-commit 2.9.3\r\n Uninstalling pre-commit-2.9.3:\r\n Successfully uninstalled pre-commit-2.9.3\r\nSuccessfully installed pre-commit-2.9.2\r\nWARNING: You are using pip version 20.3.1; however, version 21.0 is available.\r\nYou should consider upgrading via the '/home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/bin/python3.6 -m pip install --upgrade pip' command.\r\n~/projects/SaltStack/CVEs/salt/salt-priv/features/bandit (features/bandit|✔) SaltPriv-3.6\r\n❯ pre-commit run -av bandit-salt\r\nRun bandit against Salt..................................................^CInterrupted (^C): KeyboardInterrupt:\r\nCheck the log at /home/vampas/.cache/pre-commit/pre-commit.log\r\n```","author":{"url":"https://github.com/s0undt3ch","@type":"Person","name":"s0undt3ch"},"datePublished":"2021-01-27T16:49:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/1777/pre-commit/issues/1777"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:448c33ce-ebcb-388e-65f0-1e8c812fc25e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CAFC:3A8CAE:C067CC:105755B:6A55B3C2 |
| html-safe-nonce | d9272444eeae8967cd785bc940fccbb97edee3b6e12d1f7a032b3f4c4f5207f3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUZDOjNBOENBRTpDMDY3Q0M6MTA1NzU1Qjo2QTU1QjNDMiIsInZpc2l0b3JfaWQiOiI0MzkzODExNjgzNzI0MDgwMDY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ccdb9a2296e1b99375ea74c3654a44128f1349e4d04391476bf887bb5cb78bd4 |
| hovercard-subject-tag | issue:795268931 |
| github-keyboard-shortcuts | repository,issues,commits,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pre-commit/pre-commit/1777/issue_layout |
| twitter:image | https://opengraph.githubassets.com/69e28895ced7e7c30baf8b0e0184c8a47c696a30ea3f18394dc36ace28d1bede/pre-commit/pre-commit/issues/1777 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/69e28895ced7e7c30baf8b0e0184c8a47c696a30ea3f18394dc36ace28d1bede/pre-commit/pre-commit/issues/1777 |
| og:image:alt | Latest release 2.9.3 broke git worktrees support version information pre-commit version: 2.9.3 sys.version: 3.6.8 (default, Apr 15 2020, 09:32:35) [GCC 9.3.0] sys.executable: /home/vampas/.dotfiles... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | s0undt3ch |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/pre-commit/pre-commit git https://github.com/pre-commit/pre-commit.git |
| octolytics-dimension-user_id | 6943086 |
| octolytics-dimension-user_login | pre-commit |
| octolytics-dimension-repository_id | 17689377 |
| octolytics-dimension-repository_nwo | pre-commit/pre-commit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17689377 |
| octolytics-dimension-repository_network_root_nwo | pre-commit/pre-commit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 653fccf1e27344851c0d3de3fa6faa526197f072 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width