$ git diff HEAD~1..HEAD | head
diff --git Documentation/git.txt Documentation/git.txt
index bd659c4..7913fc2 100644
--- Documentation/git.txt
+++ Documentation/git.txt
@@ -43,6 +43,11 @@ unreleased) version of Git, that is available from the 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
+* link:v2.10.0/git.html[documentation for release 2.10]
+
$
diff
コマンド自体、何の違いを示さないだろう。 git
はおそらくDocumentation/git.txt
という2つの異なるバージョンに対応するテンポラリファイルを作成し、diff
にフィードしますが、それらのテンポラリファイルの名前は役に立ちません。私はgit diff
のマッサージがdiff
の出力を読者にとってより意味のあるものにすると考えています。 Gitのソースコードに
ダイビング、diff.c
は文字列リテラルとしてハードワイヤードの文字列"diff --git"
を持っています
strbuf_addf(&header, "%s%sdiff --git %s %s%s\n", line_prefix, meta, a_one, b_two, reset);
そして、その文字列が含まれている最も古いバージョンのためdiff.c
の歴史を見て:
$ git log -n 1 b58f23b3
commit b58f23b38a9a9f28d751311353819d3cdf6a86da
Author: Junio C Hamano <[email protected]>
Date: 2005-05-18 09:10:47 -0700
[PATCH] Fix diff output take #4.
This implements the output format suggested by Linus in
<[email protected]>, except the
imaginary diff option is spelled "diff --git" with double dashes as
suggested by Matthias Urlichs.
Signed-off-by: Junio C Hamano <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
$
おそらく<Pine.LNX...>
はメーリングリストのどこかのメールメッセージのメッセージIDです。いずれの場合でも、このコミットメッセージは、diff --git
が「虚偽差分オプション」であることを明確にします。
This email message(注釈でnosによって引用されている)は、これにつながった議論の一部であると思われる。
本当にこのような奇妙な方法でこれらのコマンドがどのように含まれているのか混乱しています。 –
特定の出力はここに追加されています:https://github.com/git/git/commit/b58f23b38a9a9f28d751311353819d3cdf6a86daとその理由はここに埋もれています:http://www.gelato.unsw.edu.au/archives/ git/0505/3812.html – nos
誰かがそれを削除しましたが、もともと 'osx'タグがあり、これがmacOSに同梱されている' diff'であることを示しています。 – JHZ