# Merges via "push" leave top=bottom so we must look at old patch
# in this case (unlike, eg., "pick --fold")
patchdir="$(git-rev-parse --git-dir)/patches/$(stg branch)/patches/$(stg top)"
-if [ -s "$(git-rev-parse --git-dir)/conflicts" ];
-then
- current_cmd="stg show //top.old"
-else
- current_cmd="stg show"
-fi
+case $(stg log | head -n1) in
+ *push\(c\)*) former="//top.old" ;;
+ *) former="//top" ;;
+esac
-colordiff "$@" \
- -I '^index [0-9a-b]*..[0-9a-b]*' \
- -I '^@@ .* @@' \
- <($current_cmd) <(stg diff -r//bottom) | less -RFX
+stg-mdiff -o "$*" \
+ $former //bottom..