pgit.sh: Don't show fat header for one project

The fat marker with counter (# ==== [1/1] Fetching ...) is
distracting if shown for only one project, so only show a regular
marker without counter.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-21 08:03:13 +01:00
commit b9e1f91ff6

View file

@ -18,14 +18,24 @@ fatal()
exit 1 exit 1
} }
counter()
{
[ "$n_projects" != 1 ] || return
echo " [$cur/$n_projects]"
}
marker() marker()
{ {
log "# ------------- [$cur/$n_projects] $@" log "# -------------$(counter) $@"
} }
fat_marker() fat_marker()
{ {
log "# ==================================================== [$cur/$n_projects] $@" if [ "$n_projects" = 1 ]; then
marker "$@"
return
fi
log "# ====================================================$(counter) $@"
} }
# #