summaryrefslogtreecommitdiff
path: root/git-branch-script
AgeCommit message (Collapse)AuthorFilesLines
2005-08-24Audit rev-parse users again.Libravatar Junio C Hamano1-1/+1
Some callers to rev-parse were using the output selection flags inconsistently. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-17[PATCH] Change git-branch to list branchesLibravatar Kalle Valo1-5/+20
If no argument provided to `git branch`, show available branches and mark current branch with star. This is based on patch written by Amos Waterland <apw@rossby.metr.ou.edu>. [jc: and I changed it to handle subdirectories under refs/heads/ as well.] Signed-off-by: Kalle Valo <Kalle.Valo@iki.fi> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-22[PATCH] git-branch: avoid getting confused by empty or nonexisting branches.Libravatar Junio C Hamano1-1/+7
When not specifying the start point explicitly, we ended up emitting ^0 in addition to the default HEAD. Be careful to see if we have "$2" before finding out which commit to base the new branch on. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-11Add "git branch" scriptLibravatar Linus Torvalds1-0/+11
You can use it as git branch <branchname> [start-point] and it creates a new branch of name <branchname>. If a starting point is specified, that will be where the branch is created, otherwise it will be created at the current HEAD. The sequence git branch xyz abc git checkout xyz can also be written as git checkout -b xyz abc as per the previous commit.