From: Brian Gernhardt Date: Wed, 02 Jul 2008 15:22:14 GMT Subject: Re: [PATCH] prevent checkout from creating branches that start with a dash Message-ID: <3B740C23-95C7-44AD-8A36-9EFA2EEF0E8A@silverinsanity.com> In-Reply-To: <20080702150128.GH26300@jukie.net> On Jul 2, 2008, at 11:01 AM, Bart Trojanowski wrote: > + if (opts.new_branch && validate_branch_name(opts.new_branch)) > + die("git checkout: '%s' does not look like a valid branch name", > + opts.new_branch); > + > if (argc) { > const char **pathspec = get_pathspec(prefix, argv); Perhaps this should have !opts.force in that if? That way if someone needs something like "-mm" branch, they can have it. And that way, if people really want to shoot themselves in the foot with a -f branch, they can? "git branch -f -b -f"? ~~ Brian