6 LOG_FILE="../stats/next-$d-summary"
12 echo "$@" | tee -a $LOG_FILE
17 printf "$@" | tee -a $LOG_FILE
23 git diff-tree -p "$id" | git patch-id | head -n 1
29 patch_and_sha_ids "$@" | cut -d' ' -f1
32 trees=$(grep -v '^#' ../real_control | awk -F ' ' '{ printf("%s ", $3); }')
40 plog '%-20s %7s' "Tree" "commits"
42 plog '\t%s' "change since next-$prev"
47 [ "$t" = "origin" ] &&
51 prev_num=$(egrep "^$t +[0-9]+" "../stats/next-$prev-summary")
52 if [ "$prev_num" ]; then
53 prev_num=$(expr "$prev_num" : "[^ ]* *\([0-9]*\).*")
60 git rev-parse --verify "$h" >/dev/null 2>&1 ||
63 mb=$(git merge-base "refs/next/$d/origin" $h)
64 rh=$(git rev-parse $h)
65 [ "$mb" = "$rh" ] && {
68 plog '\t\t%+7d' $((0 - prev_num))
69 total_diff=$((total_diff - prev_num))
75 c=$(git rev-list --no-merges $mb...$rh $seen_heads | sort)
76 seen_heads="$seen_heads ^$rh"
80 plog '\t\t%+7d' $((0 - prev_num))
81 total_diff=$((total_diff - prev_num))
87 # origin_ids=$(patch_ids $(git rev-list --no-merges $mb..origin/master))
89 is=$(patch_and_sha_ids $c)
90 # is=$(join -v 1 <(echo "$is") <(echo "$origin_ids"))
91 is=$(echo "$is" | join -v 1 - "../stats/origin-$d.ids")
92 is=$(join -v 1 <(echo "$is") <(echo "$seen_ids"))
93 c1=$(echo "$is" | cut -d' ' -f2)
95 seen_ids=$( (echo "$seen_ids"; echo "$is" | cut -d' ' -f1) | sort)
97 seen_sha1s="$seen_sha1s $c1"
99 # log $t \($(echo "$c" | wc -w) $(echo "$c1" | wc -w)\)
100 num=$(echo "$c1" | wc -w)
101 plog '%-20s %7d' $t $num
103 plog '\t\t%+7d' $((num - prev_num))
104 total_diff=$((total_diff + num - prev_num))
108 total_commits=$((total_commits + num))
112 plog '%-20s %7d' 'Total' $total_commits
114 plog '\t\t%+7d' $total_diff
118 git shortlog --no-walk $seen_sha1s 2>&1 | tee -a $LOG_FILE