-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
+patchdir="$(git rev-parse --git-dir)/patches/$(stg branch)/patches/$(stg top)"
+case $(stg log | head -n1) in
+ *push\(c\)*) former="//top.old" ;;
+ *) former="//top" ;;
+esac