From 1783aa1027a575407401160381de21a8512f3a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Mon, 4 Jun 2018 19:02:58 +0200 Subject: Less output, just mention number of changes --- updateGit.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/updateGit.py b/updateGit.py index 10acc45..4adf28c 100755 --- a/updateGit.py +++ b/updateGit.py @@ -87,11 +87,15 @@ def updatePath(path): continue if local == base: if local_branch == cur_branch: - print('[%s]' % friendly_path, 'Updated branch ', cur_branch, - getGitStdout(path, ['merge', remote])) + getGitStdout(path, ['merge', remote]) + local_short = getGitStdout(path, ['rev-parse', '--short', local]) + remote_short = getGitStdout(path, ['rev-parse', '--short', remote]) + shortstat = getGitStdout(path, ['diff', '--shortstat', local, remote]) + print('[%s]' % friendly_path, 'Updated branch', cur_branch, '{}..{}'.format(local_short, remote_short), "\n", shortstat) else: - print('[%s] Updated branch %s:' % (friendly_path, cur_branch), - getGitStdout(path, ['branch', '-f', local_branch, remote])) + getGitStdout(path, ['branch', '-f', local_branch, remote]) + shortstat = getGitStdout(path, ['diff', '--shortstat', local, remote]) + print('[%s] Updated branch %s:' % (friendly_path, cur_branch), '{}..{}'.format(local, remote), "\n", shortstat) if remote == base: print('[%s] %s is ahead. Consider pushing your changes.' % (friendly_path, local_branch)) -- cgit v1.2.3