unixorn/git-extra-commands

View on GitHub
bin/git-edit-conflicts

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash

if [ -n "$VISUAL" ]; then
    edit=$VISUAL
elif  [ -n "$EDITOR" ]; then
    edit=$EDITOR
else
    echo "\$VISUAL and \$EDITOR are both unset, aborting"
    exit 1
fi

git conflicts | xargs "$edit"