From ae3d30fb6e0fbe729f9bd9e48c7273e9fd0ec4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=B3=BD=E8=BD=A9?= Date: Fri, 6 Feb 2026 15:03:50 +0800 Subject: [PATCH] add details when multiple active operations found (#1229) Signed-off-by: spacewander --- bin/git-abort | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/git-abort b/bin/git-abort index af1712b..36c0c9a 100755 --- a/bin/git-abort +++ b/bin/git-abort @@ -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 }