summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2019-01-13 19:52:20 +0100
committerAndré Glüpker <git@wgmd.de>2019-01-13 19:52:20 +0100
commit20670de7ad7278f8fcd1c40c72af51ab4e7b4511 (patch)
treecb265e7afc41e4b4548ed46fe38293ced05ec630
parent57eaebb6e6d7b30831b086fe59a8a2b49c08215b (diff)
downloadupdate-git-20670de7ad7278f8fcd1c40c72af51ab4e7b4511.tar.gz
update-git-20670de7ad7278f8fcd1c40c72af51ab4e7b4511.tar.bz2
update-git-20670de7ad7278f8fcd1c40c72af51ab4e7b4511.zip
Output summary of changes after a merge
-rwxr-xr-xupdateGit.py4
1 files changed, 4 insertions, 0 deletions
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