unixorn/git-extra-commands

View on GitHub
bin/git-rebase-authors

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
# Author: Mislav Marohnić
# https://github.com/mislav/dotfiles
#
# rebase-authors adds authorship info to interactive git rebase output

set -e

# shellcheck disable=SC2162,SC2034
while read action sha other; do
  if [ -n "$action" ]; then
    echo -n "$action "
    git show "$sha" --format="%h [%an] %s" -s
  else
    echo
  fi
done