mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
add details when multiple active operations found (#1229)
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
This commit is contained in:
parent
032090e847
commit
ae3d30fb6e
|
|
@ -21,7 +21,11 @@ validate_op() {
|
|||
exit 1
|
||||
fi
|
||||
if [[ "$(echo "$op" | wc -l)" -gt 1 ]]; then
|
||||
echo "Multiple active operations found: $op" >&2
|
||||
echo "Multiple active operations found:" >&2
|
||||
gitdir="$(git rev-parse --git-dir)" || exit
|
||||
for o in $op; do
|
||||
echo " - $o: HEAD: $(cat "${gitdir}/${o}_HEAD")" >&2
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue