Re: [PATCH] prevent checkout from creating branches that start with a dash

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

 



Bart Trojanowski schrieb:
> It was previously possible to create a -f branch with git-checkout, which
> could not be used or deleted.
> 
>         $ git checkout -b -f master
>         Switched to a new branch "-f"

"-f" *is* a valid branch name and can be used and deleted:

$ git checkout -b -f next
Switched to a new branch "-f"
$ git checkout next
Switched to branch "next"
Your branch is ahead of the tracked remote branch 'origin/next' by 2 commits.
$ git checkout -- -f
Switched to branch "-f"
$ git checkout next
Switched to branch "next"
Your branch is ahead of the tracked remote branch 'origin/next' by 2 commits.
$ git branch -d -- -f
Deleted branch -f.

-- Hannes

--
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