summaryrefslogtreecommitdiff
path: root/branch.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow tracking branches to set up rebase by default.Dustin Sallings2008-05-111-1/+21
| | | | | | | | | | | | | Change cd67e4d4 introduced a new configuration parameter that told pull to automatically perform a rebase instead of a merge. This change provides a configuration option to enable this feature automatically when creating a new branch. If the variable branch.autosetuprebase applies for a branch that's being created, that branch will have branch.<name>.rebase set to true. Signed-off-by: Dustin Sallings <dustin@spy.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* branch: optionally setup branch.*.merge from upstream local branchesJay Soffian2008-02-191-20/+24
| | | | | | | | | | | | | | | | | | | "git branch" and "git checkout -b" now honor --track option even when the upstream branch is local. Previously --track was silently ignored when forking from a local branch. Also the command did not error out when --track was explicitly asked for but the forked point specified was not an existing branch (i.e. when there is no way to set up the tracking configuration), but now it correctly does. The configuration setting branch.autosetupmerge can now be set to "always", which is equivalent to using --track from the command line. Setting branch.autosetupmerge to "true" will retain the former behavior of only setting up branch.*.merge for remote upstream branches. Includes test cases for the new functionality. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Move code to clean up after a branch change to branch.cDaniel Barkalow2008-02-091-0/+8
| | | | Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
* Move create_branch into a library fileDaniel Barkalow2008-02-091-0/+140
You can also create branches, in exactly the same way, with checkout -b. This introduces branch.{c,h} library files for doing porcelain-level operations on branches (such as creating them with their appropriate default configuration). Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>