0

I found ways to use opendiff for "git diff" but "git show" doesn't have quite the same options.

vaebnkehn
  • 113
  • 5
  • I think `git show` is more like `git log` and not really like `git diff` even though `git show` does sometimes show diffs. – willoller Oct 19 '12 at 00:43

2 Answers2

0

According to the man page, git-show runs git diff-tree -cc behind the scenes to produce the diff output. This probably bypasses your git-diff customizations.

Try changing your .gitconfig to add the same options when you run git-diff as git-diff-tree.

willoller
  • 7,106
  • 1
  • 35
  • 63
0

You can convince git diff to show you the difference between the last two commits using this bit of a hack:

COMMITS=$(git log --name-status HEAD^^..HEAD | grep "commit" | sed 's/commit/ /')
COMMITS=($COMMITS)
git diff ${COMMITS[1]} ${COMMITS[0]}

in which case git will use whatever editor you told it to use for git diff.

vaebnkehn
  • 113
  • 5