Add a new 'log' command that is similar to 'diff' but shows the log of
commits from HEAD to origin/master, thus listing all commits that have
not yet been pushed.
For example:
$ make log
packages/glib-networking
glib-networking: enable installed tests
packages/gnome-desktop
gnome-desktop: Autospec creation for update from version 3.34.3 to version 3.36.0
packages/gnome-terminal
gnome-terminal: Autospec creation for update from version 3.34.2 to version 3.36.0.1
Signed-off-by: Ross Burton <ross.burton(a)intel.com>
---
Makefile.toplevel | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Makefile.toplevel b/Makefile.toplevel
index be6c085..4e54858 100644
--- a/Makefile.toplevel
+++ b/Makefile.toplevel
@@ -166,6 +166,15 @@ diff: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
(cd $$p ; git status | grep -q 'nothing to commit, working [^ ]* clean' ||
(echo "Uncommitted changes in: $$p"; git diff |diffstat -p1)) ;\
done
+#help log: Run git log HEAD...origin/master for all package repos, thus
+#help log: displaying any committed but unpushed changes.
+log: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
+ @for p in projects/common $(addprefix packages/,$(PKGS_LOCAL)); do \
+ ( cd $$p; if [ "$$(git rev-parse --verify HEAD)" != "$$(git rev-parse
--verify origin/master)" ] ; then \
+ echo $$p ; git --no-pager log --pretty="format:%s" origin/master..HEAD ; echo
; echo;\
+ fi ; ) \
+ done
+
#help versions: Displays the version of each package in the ./packages tree.
versions: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
@for p in $(addprefix packages/,$(PKGS_LOCAL)); do \
--
2.26.0