From: Junio C Hamano Date: Wed, 25 Jan 2006 01:37:01 +0000 (-0800) Subject: sample update-hook: sanely handle a new branch head. X-Git-Tag: v1.2.0~117 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/41e79c955969c916c0691c31422b5004db7e4025?hp=8a3ee7c31469b5418a556a87cbac74509ded1cac 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 --- diff --git a/templates/hooks--update b/templates/hooks--update index 27cea174d1..d7a8f0a849 100644 --- a/templates/hooks--update +++ b/templates/hooks--update @@ -68,7 +68,7 @@ then refs/heads/*) branch="${1##refs/heads/}" echo "New branch '$branch' available with the following commits:" - git-rev-list --pretty "$3" + git-rev-list --pretty "$3" $(git-rev-parse --not --all) ;; esac else