2015-09-29 11 views

答えて

4

TL; DR

私はこれが --exit-code手段[​​...]

--exit-codeは変更がある場合1でGitのコマンドの終了を作るdiff-* オプションが何であるかを知りたいのです

、およびそれ以外の場合は 0です。

[...]でもどこでも見つかりません。それはgit-logのコンテキストでは意味がありませんので、あなたは、git-log manページにgit-diff manページでそれについて読んですることはできませんが、

詳細

両方--check--exit-codegit-diffマニュアルページ(より具体的には、Documentation/diff-options.txt中)に記載されている:

--check 
Warn if changes introduce whitespace errors. What are considered 
whitespace errors is controlled by core.whitespace configuration. 
By default, trailing whitespaces (including lines that solely 
consist of whitespaces) and a space character that is immediately 
followed by a tab character inside the initial indent of the line 
are considered whitespace errors. Exits with non-zero status if 
problems are found. Not compatible with --exit-code. 

--exit-code 
Make the program exit with codes similar to diff(1). That is, it 
exits with 1 if there were differences and 0 means no differences. 

一部ではありますが、すべてではありませんが、diff-*のオプションはgit-logと互換性があります。 Git-project repositoryから次commit messageによりを示唆したよう--exit-codeオプションは、ないのに対し、--checkオプションは、次のとおりです。

ドキュメント:gitのログに--quiet--exit-codeを言及していない(1)

これらのdiff -optionsですが、logという文脈で実際には意味がありません。 配管用

(1)diff-*スタンド磁器git-diffが基づいていることを指示します。

2

それはgit-diff docsで述べています(と明らかにgit-logで使用されるものではない):。

「差分に似たコード(1)とプログラムの終了を行います。つまりあれば、それは1で終了します違いがあり、0は違いがないことを意味します。

関連する問題