Skip to content

Instantly share code, notes, and snippets.

@fapestniegd
Created July 31, 2013 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fapestniegd/6123704 to your computer and use it in GitHub Desktop.
Save fapestniegd/6123704 to your computer and use it in GitHub Desktop.
git log --pretty=oneline --reverse | while read commit comment; do
file_hash=$(git ls-tree $commit etc/fakeldap/hosts.yaml | cut -d " " -f 3 | cut -f 1);
if [ ! -z "$file_hash" ]; then
echo "$commit";
git cat-file -p $file_hash | sed -e's/#.*//' | grep . | head -1 ;
fi ;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment