使用 Git 捆绑包的 Textmate 出现错误

发布于 2024-08-16 03:03:56 字数 1739 浏览 3 评论 0原文

尝试将 Textmate 与 Git 捆绑包一起使用。尝试任何选项时都会遇到错误。

/Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/../lib/git.rb:131:in `paths': No selected files. (RuntimeError) from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/../lib/git.rb:80:in `path' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/../lib/git.rb:199:in `merge_message' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/../app/controllers/commit_controller.rb:6:in `index' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:105:in `send' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:105:in `call' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:94:in `with_filters' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:105:in `call' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:112:in `call' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/tmvc.rb:56:in `dispatch_normal' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/tmvc.rb:74:in `dispatch' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/tmvc.rb:96:in `dispatch' from /tmp/temp_textmate.hNAQFu:4

我的 TM_GIT 设置为与 which git 相同的目录。真的迷失了并寻求任何帮助。

Trying to use Textmate with the Git bundle. Running into errors when trying any option.

/Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/../lib/git.rb:131:in `paths': No selected files. (RuntimeError) from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/../lib/git.rb:80:in `path' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/../lib/git.rb:199:in `merge_message' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/../app/controllers/commit_controller.rb:6:in `index' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:105:in `send' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:105:in `call' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:94:in `with_filters' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:105:in `call' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:112:in `call' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/tmvc.rb:56:in `dispatch_normal' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/tmvc.rb:74:in `dispatch' from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/tmvc.rb:96:in `dispatch' from /tmp/temp_textmate.hNAQFu:4

My TM_GIT is set to the same dir as which git. Really lost and looking for any help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

°如果伤别离去 2024-08-23 03:03:57

我有完全相同的错误。对我来说,更新终端中的 git 包解决了问题:

$ cd ~/Library/Application\ Support/TextMate/Bundles/Git.tmbundle/
$ git pull

在 TextMate 重新启动后,问题应该消失。

I had the exact same error. For me updating the git bundle in the Terminal solved the problem:

$ cd ~/Library/Application\ Support/TextMate/Bundles/Git.tmbundle/
$ git pull

After a TextMate restart the problem should be gone.

左耳近心 2024-08-23 03:03:57

如果你查看 git.rb 的源代码< /a>,您将看到它查找以下环境变量来确定路径:

  • 'TM_SELECTED_FILES'
  • 'TM_PROJECT_DIRECTORY'
  • 'TM_FILEPATH'
  • '< code>TM_DIRECTORY'

因此,要开始调试它,您可以查看为什么未设置这些变量。

If you look at the source code of git.rb, you will see it looks for the following environment variables for determining paths:

  • 'TM_SELECTED_FILES'
  • 'TM_PROJECT_DIRECTORY'
  • 'TM_FILEPATH'
  • 'TM_DIRECTORY'

So to start debug this, you could look as to why those variables are not set.

素食主义者 2024-08-23 03:03:57

似乎您只能在打开 Git 托管文件夹中的文件时运行 Git 捆绑命令。
尝试打开 Git 存储库中的文件,“Git 更新”将开始工作。

It seems you can only run Git bundle commands while opening a file in a Git managed folder.
Try opening a file in a Git repository and the "Git Update" will start working.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文