tg-update.sh: reduce git merge spewtopgit-0.19.3
commit439114c31502b2fde9231f5aaa1049d3454bc515
authorKyle J. McKay <mackyle@gmail.com>
Mon, 29 Feb 2016 18:09:36 +0000 (29 10:09 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 29 Feb 2016 18:09:36 +0000 (29 10:09 -0800)
tree2839930a0eaf60e108f6c5b8c84f28f37de66562
parent3a94a545b9d185df20b1cf67901fc3ddf1deef46
tg-update.sh: reduce git merge spew

Even on fast-forwards, git merge has a tendency to spew a volume
of output.  This makes it hard to follow the status of an extended
tg update operation with many dependencies.

Correct this by limiting the merge output to a --shortstat.
Unfortunately since git merge does not accept --shortstat we must
remember the previous HEAD and manually run a git diff --shortstat
afterwards while passing --no-stat to git merge.  We only show the
--shortstat if the merge was successful since the focus on a failed
merge should be the merge failures (and the final stat info won't
be available after a failed merge anyway).

Conveniently git diff --shortstat produces no output at all if there
are no changes between the two commits it's given while returning no
error.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
tg-update.sh