#!/usr/bin/env bash
## Edit the files that are marked as conflicted during a merge/rebase in your EDITOR/VISUAL.
## Source: git-extra-commands

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"
