public
Description: A bunch of random scripts I've either written, downloaded or clipped from #git.
Homepage:
Clone URL: git://github.com/jwiegley/git-scripts.git
git-scripts / git-diff-directory
100755 17 lines (13 sloc) 0.257 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
 
stat=true
if [[ "$1" == "-p" ]]; then
stat=false
shift 1
fi
 
HERE=$(pwd)
 
(cd "$1" && git --git-dir=$HERE/.git diff ${2:-HEAD}) | \
    if [[ $stat == true ]]; then \
        diffstat | grep -v only$; \
    else \
        cat; \
    fi