Git Changed Files

You’d think this would be easy, but wtf git.

files_since() {
  changed_since="$(git log -1 --before="@{$2}")"
  files="${changed_since:+"$(git diff-tree --no-commit-id --name-only -r "$1" | xargs)"}"
  echo "$files"
}
diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent topic) <(git rev-list --first-parent master)|head -1
# or
git log -n1 --format=format:%H $(git log --reverse --format=format:%H master..topic | head -1)~