Skip to content

Instantly share code, notes, and snippets.

@travist
Created January 24, 2012 20:59
Show Gist options
  • Save travist/1672594 to your computer and use it in GitHub Desktop.
Save travist/1672594 to your computer and use it in GitHub Desktop.
Determine all commits for a developer given a time range.
git log --shortstat --since="2011-9-1" --until="2011-11-15" \
| grep "commit\|Author\|Merge:" \
| awk '{\
if ($1 == "Merge:") {\
merge = 1;\
}\
if ($1 == "commit") {\
merge = 0;\
commit = $2;\
}\
if ($1 == "Author:" && tolower($2) == tolower("Travis")) {\
if (!merge) {\
merge = 0;\
print system("git diff " commit "^ " commit);\
}\
}\
}' > Travis_2011-9-1__2011-11-15.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment