fetch: describe new refs based on where it came from
authorMarc Branchaud <marcnarc@xiplink.com>
Mon, 16 Apr 2012 22:08:50 +0000 (18:08 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Apr 2012 15:26:00 +0000 (08:26 -0700)
commit0997adaa74dfe07cee3180c3a6fd91949fb4e3d8
tree2d724488af8e8a617d83c44022595303f378c455
parent6da618d5c2ae95f08c9a24d0cce2d5d93b60cfbe
fetch: describe new refs based on where it came from

update_local_ref() used to say "[new branch]" when we stored a new ref
outside refs/tags/ hierarchy, but the message is more about what we
fetched, so use the refname at the origin to make that decision.

Also, only call a new ref a "branch" if it's under refs/heads/.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c
t/t5510-fetch.sh