mergetool: take the "-O" out of $orderfile
authorRichard Hansen <hansenr@google.com>
Tue, 10 Jan 2017 20:42:01 +0000 (15:42 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Jan 2017 21:22:20 +0000 (13:22 -0800)
This will make it easier for a future commit to convert a relative
orderfile pathname to either absolute or relative to the top-level
directory. It also improves code readability.

Signed-off-by: Richard Hansen <hansenr@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-mergetool.sh
index e52b4e4f24088d7552d88aa5a3c9ffc308f6a4cf..b506896dc1fcd8b2037d3bb61525371a74d0ca03 100755 (executable)
@@ -421,7 +421,7 @@ main () {
                        prompt=true
                        ;;
                -O*)
-                       orderfile="$1"
+                       orderfile="${1#-O}"
                        ;;
                --)
                        shift
@@ -465,7 +465,7 @@ main () {
 
        files=$(git -c core.quotePath=false \
                diff --name-only --diff-filter=U \
-               ${orderfile:+"$orderfile"} -- "$@")
+               ${orderfile:+"-O$orderfile"} -- "$@")
 
        cd_to_toplevel