From 20670de7ad7278f8fcd1c40c72af51ab4e7b4511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Sun, 13 Jan 2019 19:52:20 +0100 Subject: Output summary of changes after a merge --- updateGit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/updateGit.py b/updateGit.py index a73d5ae..825ef45 100755 --- a/updateGit.py +++ b/updateGit.py @@ -91,11 +91,15 @@ def updatePath(path): local_short = getGitStdout(path, ['rev-parse', '--short', local]) remote_short = getGitStdout(path, ['rev-parse', '--short', remote]) shortstat = getGitStdout(path, ['diff', '--shortstat', local, remote]) + shortlog = getGitStdout(path, ['log', '--pretty=format:… %s', '{}..{}'.format(local, remote)]) print('[%s]' % friendly_path, 'Updated branch', cur_branch, '{}..{}'.format(local_short, remote_short), "\n", shortstat) + print(shortlog) else: getGitStdout(path, ['branch', '-f', local_branch, remote]) shortstat = getGitStdout(path, ['diff', '--shortstat', local, remote]) + shortlog = getGitStdout(path, ['log', '--pretty=format:… %s', '{}..{}'.format(local, remote)]) print('[%s] Updated branch %s:' % (friendly_path, cur_branch), '{}..{}'.format(local, remote), "\n", shortstat) + print(shortlog) if remote == base: print('[%s] %s is ahead. Consider pushing your changes.' % (friendly_path, local_branch)) continue -- cgit v1.2.3