Re: search for equivalent commits by patch-id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 19, 2014 at 03:26:17PM +0300, vicentiu.neagoe@xxxxxx wrote:

> Is there a way to find all equivalent commits by patch-id?
> 
> Something similar to:
> 
> git branch -a --commit <commit>
> 
> but instead of <commit> to search by patch-id.

There isn't a ready-made command to do so, but you can easily script it:

  git for-each-ref --format='%(refname)' refs/heads |
  while read ref; do
	echo "$(git diff-tree -p "$ref" | git patch-id) $ref"
  done |
  grep $PATCH_ID_YOU_ARE_LOOKING_FOR

If you want to look further back than the tips, you can feed the
branches to rev-list, and then patch-id each commit you find.

The more common way to use patch-ids is to look for commits that are in
one branch but not another. For that, try the "--cherry-pick" and
"--cherry-mark" options to "git log".

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]