author | Andy Parkins <andyparkins@gmail.com> | |
Tue, 21 Nov 2006 19:31:24 +0000 (19:31 +0000) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 22 Nov 2006 05:26:12 +0000 (21:26 -0800) | ||
commit | bfcc921430423828233dadfe274802ae68900f6e | |
tree | 65167c030fc80747a6a942c218f9d79209ad75b0 | tree | snapshot |
parent | 594270635732d6320d6e6d7fa127679ae90ef5b1 | commit | diff |
Add support to git-branch to show local and remote branches
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>
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>
Documentation/git-branch.txt | diff | blob | history | |
builtin-branch.c | diff | blob | history |