- Notifications
You must be signed in to change notification settings - Fork 180
Expand file tree
/
Copy pathgit-icdiff
More file actions
Latest commit
executable file
·18 lines (14 loc) · 466 Bytes
/
Copy pathgit-icdiff
File metadata and controls
executable file
·18 lines (14 loc) · 466 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
ICDIFF_OPTIONS=$(git config --get icdiff.options)
ICDIFF_OPTIONS="${ICDIFF_OPTIONS} --is-git-diff"
GITPAGER=$(git config --get icdiff.pager)
if [ -z"$GITPAGER" ];then
GITPAGER=$(git config --get core.pager)
fi
if [ -z"$GITPAGER" ];then
GITPAGER="${PAGER:-less}"
fi
if [ "${GITPAGER%%*}"="more" ] || [ "${GITPAGER%%*}"="less" ];then
GITPAGER="$GITPAGER -R"
fi
git difftool --no-prompt --extcmd="icdiff $ICDIFF_OPTIONS""$@"|$GITPAGER