Skip to content

Instantly share code, notes, and snippets.

@offby1
Created June 11, 2009 05:33
Show Gist options
  • Select an option

  • Save offby1/127723 to your computer and use it in GitHub Desktop.

Select an option

Save offby1/127723 to your computer and use it in GitHub Desktop.
#!/bin/sh
commit=$1
git diff --name-only $commit..${commit}^ > files
git cat-file commit $commit | egrep '^tree ' | awk '{print $2}' | xargs git ls-tree --full-tree -r > tree
join -1 1 -2 4 files tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment