1

尝试将 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

MyTM_GIT设置为与which git. 真的迷路了,寻求任何帮助。

4

3 回答 3

3

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

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

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

于 2009-12-31T10:48:49.397 回答
0

如果您查看git.rb 的源代码,您会发现它会查找以下环境变量来确定路径:

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

所以要开始调试,你可以看看为什么没有设置这些变量。

于 2009-12-29T09:16:40.363 回答
0

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

于 2011-09-04T04:34:37.480 回答