File: guilt-diff

package info (click to toggle)
guilt 0.36-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,272 kB
  • ctags: 201
  • sloc: sh: 3,062; makefile: 93; perl: 42
file content (33 lines) | stat: -rwxr-xr-x 440 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#
# Copyright (C) Josef 'Jeff' Sipek, 2007-2013
#

USAGE="[-z] [<path>...]"
if [ -z "$GUILT_VERSION" ]; then
	echo "Invoking `basename "$0"` directly is no longer supported." >&2
	exit 1
fi

_main() {

while [ $# -ne 0 ]; do
	case "$1" in
	-z)
		working_tree=t ;;
	-* | --*)
		usage ;;

	*)
		break ;;
	esac
	shift
done

PREV=HEAD^
[ -z "`get_top`" ] && PREV=
[ ! -z "$working_tree" ] && PREV=

git diff --binary $PREV -- "$@"

}