branch: use refs for 'tail'

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>