OLDHEAD=$(cat "$DOTEST"/head) &&
SHORTONTO=$(git rev-parse --short $(cat "$DOTEST"/onto)) &&
NEWHEAD=$(git rev-parse HEAD) &&
- message="$GIT_REFLOG_ACTION: $HEADNAME onto $SHORTONTO" &&
- git update-ref -m "$message" $HEADNAME $NEWHEAD $OLDHEAD &&
- git symbolic-ref HEAD $HEADNAME &&
+ case $HEADNAME in
+ refs/*)
- message="$GIT_REFLOG_ACTION: $HEADNAME onto $SHORTONTO)" &&
++ message="$GIT_REFLOG_ACTION: $HEADNAME onto $SHORTONTO" &&
+ git update-ref -m "$message" $HEADNAME $NEWHEAD $OLDHEAD &&
+ git symbolic-ref HEAD $HEADNAME
+ ;;
+ esac && {
+ test ! -f "$DOTEST"/verbose ||
+ git diff-tree --stat $(cat "$DOTEST"/head)..HEAD
+ } &&
rm -rf "$DOTEST" &&
+ git gc --auto &&
warn "Successfully rebased and updated $HEADNAME."
exit