projects-dir.mk: git-show-ahead-of-master: Add target

Add a new target git-show-ahead-of-master, which does what git-show-pushable did up to now: List all repos where the currently checked-out branch is ahead of origin/master.

git-show-pushable now shows repos that have their checked-out branch ahead of their respective upstream branches. Which is truer to what the target's name suggests.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-05-05 17:10:33 +02:00
commit 38f13e922a
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -362,6 +362,17 @@ git-show-non-master-branches:
done
git-show-pushable:
$(Q)for p in $(DEP_PROJECTS); do \
if ! git -C $$p rev-parse --abbrev-ref --symbolic-full-name @{upstream} >/dev/null 2>&1; then \
echo ======================= $$p ;\
git -C $$p log --oneline master.. ;\
elif git -C $$p log --oneline @{upstream}..HEAD | grep . >/dev/null 2>&1; then \
echo ======================= $$p ;\
git -C $$p log --oneline @{u}..HEAD ;\
fi ;\
done
git-show-ahead-of-master:
$(Q)for p in $(DEP_PROJECTS); do \
if git -C $$p log --oneline origin/master.. | grep . >/dev/null; then \
echo ======================= $$p ;\