File: git-icdiff

package info (click to toggle)
icdiff 2.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 588 kB
  • sloc: python: 767; sh: 220; makefile: 14
file content (18 lines) | stat: -rwxr-xr-x 466 bytes parent folder | download | duplicates (2)
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