Re: [PATCH] Add function to checkout a branch in git.el

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2008-02-13 17:30:02 +0100, Karl Hasselström wrote:

> Why the prefix? Wouldn't it be easier to just have one "switch
> branch" prompt that would tab complete existing branch names, and
>
>   * if the user enters the name of an existing branch, just switch to
>     it;
>
>   * if the user enters a name that's not the name of an existing
>     branch, ask for confirmation, and then create the new branch and
>     switch to it.

Reading your code a bit more carefully, I realize that my suggestion
doesn't give you the opportunity to base the new branch on anything
but HEAD. So change the second bullet to

  * if the user enters a name that's not the name of an existing
    branch, display a prompt like this

      Creating new branch "foo". Where should it start?

    Tab complete on existing tags and branches, but accept any
    committish. Create the new branch and switch to it.

This bit of UI could obviously be reused to make create-branch and
create-tag commands that don't switch the current branch.

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux