Skip to content

Instantly share code, notes, and snippets.

@xnzac
Created October 16, 2013 07:19
Show Gist options
  • Save xnzac/7003857 to your computer and use it in GitHub Desktop.
Save xnzac/7003857 to your computer and use it in GitHub Desktop.
Search in forks for a fix/feature/anything good in commits from fork authors
# Motivation: you want to search in forks for an urgent fix
# I've wanted to do this a few times but couldn't find any other way to,
# so wrote this.
# 1) git clone main repo
# 2) in cloned folder, fetch all commits using script from https://gist.github.com/zaczheng/7003545
# 3) search in forks(excluding main author) for patterns in
# i) commit message
# git --no-pager log --format="%h %cd %ae %s %b" --grep=<pattern> | grep -v <author's email>
# ii) in commit itself(i.e. code)
# git --no-pager log --format="%h %cd %ae %s %b" --S<pattern> | grep -v <author's email>
# iii) extras: add other stuff like --since, whatever. man git-log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment