3 # Copyright (c) Josef "Jeff" Sipek, 2007
15 bottom
=`head -1 < "$applied" | cut -d: -f1`
16 base
=`git-rev-parse $bottom^`
18 if [ -z "$patchname" ]; then
19 top
=`git-rev-parse HEAD`
21 top
=`grep "^[0-9a-f]\{40\}:$patchname" "$applied" | cut -d: -f1`
22 if [ -z "$top" ]; then
23 die
"Cannot find patch '$patchname'. Is it applied?"
29 git-diff-tree
-r "$1^" "$1" |
tr '\t' ' ' | cut
-d' ' -f6
32 cache
="$GUILT_DIR/$branch/.graphcache.$$"
39 while [ "$current" != "$base" ]; do
40 echo "# checking rev $current"
42 echo -n '' > "$cache/dep"
44 getfiles
$current |
while read f
; do
46 fh
=`echo "$f" | sha1sum | cut -d' ' -f1`
47 if [ -e "$cache/$fh" ]; then
48 # ok, something already touched this file before us
49 cat "$cache/$fh" >> "$cache/dep"
51 echo "$current" > "$cache/$fh"
54 cat "$cache/dep" |
sort |
uniq |
while read h
; do
55 echo " \"${h:0:8}\" -> \"${current:0:8}\"; // ?"
58 current
=`git-rev-parse $current^`