Staging
v0.5.2
https://github.com/git/git
Revision ee34518d629331dadd58b1a75294369d679eda8b authored by Johannes Schindelin on 16 December 2005, 01:40:25 UTC, committed by Junio C Hamano on 16 December 2005, 01:56:32 UTC
This makes git-check-ref-format fail for "HEAD". Since the check is only
executed when creating refs, the existing symbolic ref is safe.

Otherwise these commands, most likely are pilot errors, would do
pretty funky stuff:

	git checkout -b HEAD
	git pull . other:HEAD

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 06d900c
Raw File
Tip revision: ee34518d629331dadd58b1a75294369d679eda8b authored by Johannes Schindelin on 16 December 2005, 01:40:25 UTC
We do not like "HEAD" as a new branch name
Tip revision: ee34518
check-ref-format.c
/*
 * GIT - The information manager from hell
 */

#include "cache.h"
#include "refs.h"

#include <stdio.h>

int main(int ac, char **av)
{
	if (ac != 2)
		usage("git-check-ref-format refname");
	if (check_ref_format(av[1]))
		exit(1);
	return 0;
}
back to top