3 . $(dirname $0)/functions
5 while read oldrev newrev refname ; do
7 echo "$new_commits" | git rev-list --reverse --stdin | while read commit ; do
8 if [[ $(grep "$commit" "$GIT_DIR/commitnumbers" 2>/dev/null) == "" ]] ; then
9 with_lock "$GIT_DIR/commitnumbers.lock" 'echo "$commit $refname" >> "$GIT_DIR/commitnumbers"'
10 number=$(grep --max-count=1 --line-number "$commit" "$GIT_DIR/commitnumbers" | grep -oP "^\d+(?=:)")
11 git tag "r/$number" "$commit"