diff --git a/README.md b/README.md index fa5aba3..c6ff22b 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Show differences between files in a two column view. '--color-map=separator:white,description:cyan ``` -## Using with Git +## Using with Git Diff To see what it looks like, try: @@ -106,6 +106,23 @@ You can configure `git-icdiff` in Git's config: git config --global icdiff.options '--highlight --line-numbers' ``` +## Using with Git Show + +To see what it looks like, try: + +```sh +GIT_EXTERNAL_DIFF=path/to/icdiff-git-extdiff git show --ext-diff +``` + +To install this as a tool you can use with Git, copy +`git-icshow` and ``icdiff-git-extdiff into your PATH and run: + +```sh +git icshow +``` + +It uses the same `icdiff.options` configuration used by `git-icdiff`. + ## Using with subversion To try it out, run: diff --git a/git-icshow b/git-icshow new file mode 100755 index 0000000..89f5cd6 --- /dev/null +++ b/git-icshow @@ -0,0 +1,3 @@ +#!/bin/sh + +GIT_EXTERNAL_DIFF=icdiff-git-extdiff git show --ext-diff diff --git a/icdiff-git-extdiff b/icdiff-git-extdiff new file mode 100755 index 0000000..753f4ff --- /dev/null +++ b/icdiff-git-extdiff @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +ICDIFF_OPTIONS=$(git config --get icdiff.options) + +sh -c "exec icdiff $ICDIFF_OPTIONS '$2' '$5'" || true