repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
add proper error handling for all final exec calls
[hband-tools.git]
/
user-tools
/
git_diff
blob
71e0bef2724d956fe1e2a45abf751e0b38e6cd71
1
#!/bin/bash
2
3
true
<<EOF
4
=pod
5
6
=head1 NAME
7
8
git_diff - View two files' diff by git-diff(1), even not under git version control
9
10
=cut
11
12
EOF
13
14
15
declare -a
args
16
for
arg
in
"$@"
17
do
18
if
[
"
${arg:0:1}
"
!= - ]
19
then
20
arg
=
`readlink -nf "
$arg
"`
21
fi
22
args
+=(
"
$arg
"
)
23
done
24
git
diff
--no-index
"
${args[@]}
"