#!/usr/bin/env sh
# Pretty git diff display

# degrade diffs gracefully:
# prefer diff-so-fancy if it is installed,
# otherwise fallback to git's own prettifier,
# if nothing exists just pass it on
dsf() {
  if exist diff-so-fancy; then
    diff-so-fancy
  elif exist /usr/share/git/diff-highlight/diff-highlight; then
    /usr/share/git/diff-highlight/diff-highlight
  else
    cat
  fi
}

dsf