git log——exit-code是什么意思?



git-log手册描述--check选项与--exit-code选项不兼容。我想知道这个--exit-code是什么意思,但是我到处都找不到。我已经尝试了man git log, man git,谷歌和直接搜索在这里SO…没有用!

--exit-codegit log意味着什么?

;

我想知道这个--exit-code是什么意思[…]

--exit-codediff-* 1选项,如果有更改,则使Git命令退出1,否则退出0

[…但是我到处都找不到。

你可以在git-diff手册页中读到它(它只在git-log手册页中被提及)。

<标题>

更多细节

--check--exit-code都在git-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兼容。--check选项是,而--exit-code选项不是,正如git项目存储库中的以下提交消息所暗示的那样:

docs:不要在git-log(1)中提及--quiet--exit-code

这些是diff选项,但它们实际上没有意义在log .

(1) diff-*表示瓷器git-diff所基于的管道命令

在git-diff文档中提到过(显然不打算与git-log一起使用):

"使用类似于diff(1)的代码退出程序。也就是说,如果存在差异,它以1退出,0表示没有差异。"

相关内容

最新更新