Skip to content

Commit ae3d30f

Browse files
authored
add details when multiple active operations found (#1229)
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
1 parent 032090e commit ae3d30f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/git-abort

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ validate_op() {
2121
exit 1
2222
fi
2323
if [[ "$(echo "$op" | wc -l)" -gt 1 ]]; then
24-
echo "Multiple active operations found: $op" >&2
24+
echo "Multiple active operations found:" >&2
25+
gitdir="$(git rev-parse --git-dir)" || exit
26+
for o in $op; do
27+
echo " - $o: HEAD: $(cat "${gitdir}/${o}_HEAD")" >&2
28+
done
2529
exit 1
2630
fi
2731
}

0 commit comments

Comments
 (0)