diff options
-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)) |