git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Bart Trojanowski <bart@jukie.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] prevent checkout from creating branches that start with a   dash
Date: Wed, 02 Jul 2008 17:38:05 +0200	[thread overview]
Message-ID: <486BA0DD.5030608@viscovery.net> (raw)
In-Reply-To: <20080702150128.GH26300@jukie.net>

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

  parent reply	other threads:[~2008-07-02 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-02 15:01 [PATCH] prevent checkout from creating branches that start with a dash Bart Trojanowski
2008-07-02 15:22 ` Brian Gernhardt
2008-07-02 15:38 ` Johannes Sixt [this message]
2008-07-02 16:34   ` Bart Trojanowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=486BA0DD.5030608@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=bart@jukie.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).