summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hansen <hansenr@google.com>2017-01-10 20:42:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-10 21:22:20 (GMT)
commitc1b0d3a010eaed0d7683fe0593132f2211467b20 (patch)
treeeeef5c61236d6c07cc3a40b650a57653d6b8cfb4
parentb9ebb659268ae1ecf742dff6261e87f4ee57dde7 (diff)
downloadgit-c1b0d3a010eaed0d7683fe0593132f2211467b20.zip
git-c1b0d3a010eaed0d7683fe0593132f2211467b20.tar.gz
git-c1b0d3a010eaed0d7683fe0593132f2211467b20.tar.bz2
mergetool: take the "-O" out of $orderfile
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>
-rwxr-xr-xgit-mergetool.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh
index e52b4e4..b506896 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -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