From 38f13e922a203e4be3ba028eabf5171a802a6710 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 5 May 2026 17:10:33 +0200 Subject: [PATCH] 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 --- make/projects-dir.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/make/projects-dir.mk b/make/projects-dir.mk index 48a2c5b3..98aa2595 100644 --- a/make/projects-dir.mk +++ b/make/projects-dir.mk @@ -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 ;\