2017-02-09 45 views
2

当我尝试使用“gitk”打开某些大型回购的历史记录GUI时,我总是收到“参数列表太长”的错误。即使使用“gitk -n”也没有解决问题。这里有人有同样的问题吗?谢谢,gitk给出“参数列表太长”错误

couldn't execute "git": argument list too long 
couldn't execute "git": argument list too long 
    while executing 
"open [concat $cmd $ids] r" 
    (procedure "getallcommits" line 47) 
    invoked from within 
"getallcommits" 
    (procedure "readcache" line 80) 
    invoked from within 
"readcache file13" 
    ("eval" body line 1) 
    invoked from within 
"eval $script" 
    (procedure "dorunq" line 11) 
    invoked from within 
"dorunq" 
    ("after" script) 
+0

你想做什么?你的命令是什么?似乎你添加了太多的参数 – osanger

+0

我的命令只是“gitk” –

回答

1

“参数列表太长”是在命令行中传递太多参数时发生内核错误。

可能您的回购包含导致$ids(我纯粹在此猜测)的内容超出了平台的ARG_MAX限制。

这基本上是Gitk中的一个bug,但是如果你能弄清楚哪个资源导致了这个问题,你可以通过限制或修剪它来解决问题。

+2

这似乎试图解决这个问题,或类似的 - 你的回购有很多标签? http://git.vger.kernel.narkive.com/tDVsZzg7/patch-fix-gitk-with-lots-of-tags – tripleee

+0

虽然我猜错误消息似乎暗指有很多提交的回购。 – tripleee

+0

是的。这是一个大回购。它目前有9K标签。 –

1

我发现一个workaroung here它适用于我:只是删除.git/gitk.cache文件。

+0

这是正确的答案 – morpheus