| 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 | -------- |
| Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 10 | [verse] |
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 11 | 'git patch-id' < <patch> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with |
| 16 | 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] | 17 | 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] | 18 | ID" are almost guaranteed to be the same thing. |
| 19 | |
| 20 | IOW, you can use this thing to look for likely duplicate commits. |
| 21 | |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 22 | When dealing with 'git diff-tree' output, it takes advantage of |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 23 | the fact that the patch is prefixed with the object name of the |
| Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 24 | commit, and outputs two 40-byte hexadecimal strings. The first |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 25 | string is the patch ID, and the second string is the commit ID. |
| 26 | This can be used to make a mapping from patch ID to commit ID. |
| 27 | |
| 28 | OPTIONS |
| 29 | ------- |
| 30 | <patch>:: |
| 31 | The diff to create the ID of. |
| 32 | |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 33 | GIT |
| 34 | --- |
| Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 35 | Part of the linkgit:git[1] suite |