Prefixes the branch name with "BARE:" if you're in a
bare repository.
Signed-off-by: Marius Storm-Olsen <git@storm-olsen.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fi
fi
+ local c
+
+ if [ "true" = "$(git config --bool core.bare 2>/dev/null)" ]; then
+ c="BARE:"
+ fi
+
if [ -n "$b" ]; then
if [ -n "${1-}" ]; then
- printf "$1" "${b##refs/heads/}$w$i$r"
+ printf "$1" "$c${b##refs/heads/}$w$i$r"
else
- printf " (%s)" "${b##refs/heads/}$w$i$r"
+ printf " (%s)" "$c${b##refs/heads/}$w$i$r"
fi
fi
fi