$ patch --version GNU patch 2.7 Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1988 Larry Wall
License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Written by Larry Wall and Paul Eggert
$ diff --version diff (GNU diffutils) 3.2 Packaged by Gentoo (3.2) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free
GENERATING PATCHES WITH -P When "git-diff-index", "git-diff-tree", or "git-diff-files" are run with a -p option, "git diff" without the --raw option, or "git log" with the "-p" option, they do not produce the output described above; instead they produce a patch file. You can customize the creation of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.
What the -p option produces is slightly different from the traditional diff format:
1. It is preceded with a "git diff" header that looks like this:
diff --git a/file1 b/file2
The a/ and b/ filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, /dev/null is not used in place of the a/ or b/ filenames.
When rename/copy is involved, file1 and file2 show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively.
わけがわからない (スコア:0)
$ patch --version
GNU patch 2.7
Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 1988 Larry Wall
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Larry Wall and Paul Eggert
$ diff --version
diff (GNU diffutils) 3.2
Packaged by Gentoo (3.2)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free
Re:わけがわからない (スコア:1)
git-diffの出力の頭についてるところから"diff --git"フォーマットと呼んでるのかも知れませんね。まあgit使ってない…使ってもソースもらってくるくらいなので私には縁が無さそうです(汗)。