On 11/25/06, Fredrik Kuivinen <frekui@xxxxxxxxx> wrote:
On 11/25/06, Lars Hjemli <hjemli@xxxxxxxxx> wrote: > This adds a '--rename' option to git branch. If specified, branch > creation becomes branch renaming. > > With a single branchname, the current branch is renamed and .git/HEAD is > updated. > > With two branchnames, the second name is renamed to the first. Nice idea. But wouldn't it be more sensible to rename the first branch to the second instead of the other way around? That is, the syntax would be git branch --rename FROM TO which is more similar to how "mv" works.
Possibly, but then we would have git branch newbranch [oldbranch] when creating a new branch, and git branch --rename [oldbranch] newbranch for rename/move. I'd prefer to be "internally consistent", but it does look and feel a little strange... Another option would be: git branch [--rename] [--from <branch>] newbranch and deprecate the usage of two unnamed argumens for create/rename -- larsh - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html