@matheusbsbs / matheus-bagliano / commits / 41e79c9559
Fork 0

sample update-hook: sanely handle a new branch head.

Instead of showing all the history since the beginning of time leading to the the branch head, show only the changes this new branch brings to the world. This originally came from Linus and tested by Andreas Ericsson. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Jan 24, 2006 at 17:37 UTC 41e79c955969c916c0691c31422b5004db7e4025
1 file changed +1 -1
templates/hooks--update
+1 -1
@@ -68,7 +68,7 @@ then
68 refs/heads/*)
69 branch="${1##refs/heads/}"
70 echo "New branch '$branch' available with the following commits:"
71 - git-rev-list --pretty "$3"
71 + git-rev-list --pretty "$3" $(git-rev-parse --not --all)
72 ;;
73 esac
74 else