使用 Git 捆绑包的 Textmate 出现错误
尝试将 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我有完全相同的错误。对我来说,更新终端中的 git 包解决了问题:
在 TextMate 重新启动后,问题应该消失。
I had the exact same error. For me updating the git bundle in the Terminal solved the problem:
After a TextMate restart the problem should be gone.
如果你查看 git.rb 的源代码< /a>,您将看到它查找以下环境变量来确定路径:
TM_SELECTED_FILES
'TM_PROJECT_DIRECTORY
'TM_FILEPATH
'因此,要开始调试它,您可以查看为什么未设置这些变量。
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.
似乎您只能在打开 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.