Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-patch-id(1) |
| 2 | =============== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 6 | git-patch-id - Compute unique ID for a patch |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | 'git-patch-id' < <patch> |
| 11 | |
| 12 | DESCRIPTION |
| 13 | ----------- |
| 14 | A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with |
| 15 | whitespace and line numbers ignored. As such, it's "reasonably stable", but at |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 16 | the same time also reasonably unique, i.e., two patches that have the same "patch |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 17 | ID" are almost guaranteed to be the same thing. |
| 18 | |
| 19 | IOW, you can use this thing to look for likely duplicate commits. |
| 20 | |
| 21 | When dealing with git-diff-tree output, it takes advantage of |
| 22 | the fact that the patch is prefixed with the object name of the |
| 23 | commit, and outputs two 40-byte hexadecimal string. The first |
| 24 | string is the patch ID, and the second string is the commit ID. |
| 25 | This can be used to make a mapping from patch ID to commit ID. |
| 26 | |
| 27 | OPTIONS |
| 28 | ------- |
| 29 | <patch>:: |
| 30 | The diff to create the ID of. |
| 31 | |
| 32 | Author |
| 33 | ------ |
| 34 | Written by Linus Torvalds <torvalds@osdl.org> |
| 35 | |
| 36 | Documentation |
| 37 | -------------- |
| 38 | Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>. |
| 39 | |
| 40 | GIT |
| 41 | --- |
| 42 | Part of the gitlink:git[7] suite |
| 43 | |