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

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

 




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