From: Yann Dirson Date: Tue, 24 Jul 2007 18:57:35 +0000 (+0200) Subject: Add range comparison support to stg-mdiff. X-Git-Tag: v0.14.3~176 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/67e5c1c662186cd78b193d87cecd1d3097b909da Add range comparison support to stg-mdiff. We can now compare arbitrary deltas, not just single commits. Signed-off-by: Yann Dirson --- diff --git a/contrib/stg-mdiff b/contrib/stg-mdiff index cd0c678..9bb324a 100755 --- a/contrib/stg-mdiff +++ b/contrib/stg-mdiff @@ -12,7 +12,7 @@ set -e usage() { - echo "Usage: $(basename $0) " + echo "Usage: $(basename $0) ..[]| ..[]|" exit 1 } @@ -20,4 +20,13 @@ if [ "$#" != 2 ]; then usage fi -colordiff -u <(stg show "$1") <(stg show "$2") | less -RFX +case "$1" in +*..*) cmd1="stg diff" ;; +*) cmd1="stg show" ;; +esac +case "$2" in +*..*) cmd2="stg diff" ;; +*) cmd2="stg show" ;; +esac + +colordiff -u <($cmd1 "$1") <($cmd2 "$2") | less -RFX