X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/3fca69b2cdcc288e96f335bbd7ecdc8bc6912749..67e5c1c662186cd78b193d87cecd1d3097b909da:/contrib/stg-whatchanged diff --git a/contrib/stg-whatchanged b/contrib/stg-whatchanged index a416e97..231f4f5 100755 --- a/contrib/stg-whatchanged +++ b/contrib/stg-whatchanged @@ -24,12 +24,10 @@ fi # 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\)*) current_cmd="stg show //top.old" ;; + *) current_cmd="stg show" ;; +esac colordiff "$@" \ -I '^index [0-9a-b]*..[0-9a-b]*' \