From 24fec38f75e601dce83443a0f8a0282451f484d0 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 16 Sep 2026 17:31:50 +0200 Subject: [PATCH] rules.mk, projects-dir.mk: Add git-log targets The git targets of the workspace Makefile cover push, diff, and status, but not history: inspecting commits means running git log by hand in a project directory, and no target shows the history of all projects of a tree at once. Add git-log targets at both levels; the target suffix is passed to git log as-is, so make git-log-5 asks for the last five commits. - git-log-% in projects-dir.mk runs pgit.sh log over every project of the tree, one section per project - git-log-% in rules.mk runs git log -$* in the current project directory - git-log-tree-% in rules.mk runs git-log-$* in $(PROJECTS_DIR), giving the whole-tree view from inside a project; it prints a notice if PROJECTS_DIR is missing Signed-off-by: Jan Lindemann Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1 --- make/projects-dir.mk | 3 +++ make/rules.mk | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/make/projects-dir.mk b/make/projects-dir.mk index 411fb034..4b642ab1 100644 --- a/make/projects-dir.mk +++ b/make/projects-dir.mk @@ -337,6 +337,9 @@ git-short-diff: $(SSH_WRAPPER_SH) git-status: $(PGIT_SH) status -uno +git-log-%: + $(PGIT_SH) log -$* 2>&1 + git-get: $(SSH_WRAPPER_SH) $(PGIT_SH_GET_DEFAULT) touch get.done diff --git a/make/rules.mk b/make/rules.mk index 0179fbbb..e64fca06 100644 --- a/make/rules.mk +++ b/make/rules.mk @@ -243,6 +243,16 @@ ifneq ($(EXE_PATH),) endif endif +git-log-%: + git log -$* 2>&1 + +git-log-tree-%: +ifneq ($(PROJECTS_DIR),) + make --no-print-directory -C $(PROJECTS_DIR) git-log-$* 2>&1 +else + @echo "No PROJECTS_DIR defined to log commits for" +endif + # -- special built-in targets .PRECIOUS: $(LOCAL_H)