2014-02-23 107 views
1

我想用全功能/方法上下文生成統一差異。 在Ubuntu中,當我使用命令:「混帳日誌--no-合併-p --function上下文」, 我收到以下錯誤:git log「--function-context」

「致命的:無法識別的說法:--function-語境」。

有什麼解決辦法嗎?

回答

1

git log --no-merges -p --function-context工作得很好,我的git 1.8.5(在Windows上的msysgit)。
這並不奇怪,考慮到git log man page確實提到:

The command takes options applicable to the git rev-list command to control what is shown and how, and options applicable to the git diff-* commands to control how the changes each commit introduces are shown.

檢查你的Git版本:有可能它不支持這樣的說法呢。


--function-contextcommit 14937c2介紹,由Rene Scharfe,對於git的1.7.8(2011年12月)。

Add the option -W/--function-context to git diff.
It is similar to the same option of git grep and expands the context of change hunks so that the whole surrounding function is shown.
This "natural" context can allow changes to be understood better.