The new -v option makes git-branch show the abbreviated sha1 + subjectline
for each branch.
Additionally, minimum abbreviation length can be specified with
--abbrev=<length>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Instead of storing a list of refnames in append_ref, a list of
structures is created. Each of these stores the refname and a
symbolic constant representing its type.
The creation of the list is filtered based on a command line
switch; no switch means "local branches only", "-r" means "remote
branches only" (as they always did); but now "-a" means "local
branches or remote branches".
As a side effect, the list is now not global, but allocated in
print_ref_list() where it used.
Also a memory leak is plugged, the memory allocated during the
list creation was never freed.
It lays a groundwork to also display tags, but the command being
'git branch' it is not currently used.
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This replaces git-branch.sh with builtin-branch.c
The changes is basically a patch from Kristian Høgsberg, updated
to apply onto current 'next'
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>