X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=templates%2Fhooks--update;h=3f38b82a4710400e512d478ec6b552202a34369f;hb=df8baa42fe4eeb5a021ac262caf601f44d2a5746;hp=0726975367de1bff2d4575537f89f52ff87fa1a7;hpb=b30245c8e92ecaf8fb877189d7620a5a9a205120;p=git.git diff --git a/templates/hooks--update b/templates/hooks--update index 07269753..3f38b82a 100644 --- a/templates/hooks--update +++ b/templates/hooks--update @@ -16,10 +16,14 @@ then git-rev-list --pretty "$3" else $base=$(git-merge-base "$2" "$3") - if [ $base == "$2" ]; then + case "$base" in + "$2") echo "New commits:" - else + ;; + *) echo "Rebased ref, commits from common ancestor:" + ;; + esac fi git-rev-list --pretty "$3" "^$base" fi |