Edgewall Software

Changes between Version 39 and Version 40 of TracRepositoryAdmin


Ignore:
Timestamp:
Jun 12, 2015, 8:06:06 AM (5 years ago)
Author:
Jun Omae
Comment:

Fixed hooks/post-receive for Git repository when a branch is created (#12093)

Legend:

Unmodified
Added
Removed
Modified
  • TracRepositoryAdmin

    v39 v40  
    145145#!/bin/sh
    146146while read oldrev newrev refname; do
    147         git rev-list --reverse $newrev ^$oldrev  | \
    148         while read rev; do
    149                 trac-admin /path/to/env changeset added <repos> $rev
    150         done
     147    if [ "$oldrev" = 0000000000000000000000000000000000000000 ]; then
     148        git rev-list --reverse "$newrev" --
     149    else
     150        git rev-list --reverse "$newrev" "^$oldrev" --
     151    fi | xargs trac-admin /path/to/env changeset added <repos>
    151152done
    152153}}}