diff options
author | André Glüpker <git@wgmd.de> | 2018-06-04 19:02:58 +0200 |
---|---|---|
committer | André Glüpker <git@wgmd.de> | 2018-06-04 19:02:58 +0200 |
commit | 1783aa1027a575407401160381de21a8512f3a04 (patch) | |
tree | a381c5ba35a61c094536ea02c8a55103d6ff82fe | |
parent | f2c9852ae5cfdc3991f077e4bfd8aa800e31f397 (diff) | |
download | update-git-1783aa1027a575407401160381de21a8512f3a04.tar.gz update-git-1783aa1027a575407401160381de21a8512f3a04.tar.bz2 update-git-1783aa1027a575407401160381de21a8512f3a04.zip |
Less output, just mention number of changes
-rwxr-xr-x | updateGit.py | 12 |
1 files 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)) |