mirror of
https://github.com/clearlinux/common.git
synced 2026-09-06 21:51:28 +00:00
log: improve query results
Comparing whether commit hashes for `HEAD` and `origin/master` are not equal captures three typical scenarios: 1. HEAD is behind origin/master 2. HEAD is ahead of origin/master 3. HEAD is ahead of an older commit in origin/master The intent of `make log` is to capture cases #2 and #3, and not #1, so use `git rev-list ...` with the appropriate commit range instead. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
+1
-1
@@ -170,7 +170,7 @@ diff: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
#help 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 \
|
||||
( cd $$p; if [ -n "$$(git rev-list origin/master..HEAD)" ] ; then \
|
||||
echo $$p ; git --no-pager log --pretty="format:%s" origin/master..HEAD ; echo ; echo;\
|
||||
fi ; ) \
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user