Skip to content

Commit

Permalink
sample update-hook: sanely handle a new branch head.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Junio C Hamano committed Jan 25, 2006
1 parent 8a3ee7c commit 41e79c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/hooks--update
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41e79c9

Please sign in to comment.