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.$$"
34 trap "rm -rf \"$cache\"" 0
40 while [ "$current" != "$base" ]; do
41 echo "# checking rev $current"
47 getfiles
$current |
while read f
; do
49 fh
=`echo "$f" | sha1sum | cut -d' ' -f1`
50 if [ -e "$cache/$fh" ]; then
51 # ok, something already touched this file before us
52 cat "$cache/$fh" >> "$cache/dep"
54 echo "$current" > "$cache/$fh"
57 sort -u "$cache/dep" |
while read h
; do
58 echo " \"${h:0:8}\" -> \"${current:0:8}\"; // ?"
61 current
=`git-rev-parse $current^`