https://github.com/git/git
Revision 16169285f1e63f6a3d9ec10e48f55d6825d3156b authored by Junio C Hamano on 28 November 2017, 04:41:49 UTC, committed by Junio C Hamano on 28 November 2017, 04:41:49 UTC
"git branch" and "git checkout -b" are now forbidden from creating
a branch whose name is "HEAD".

* jc/branch-name-sanity:
  builtin/branch: remove redundant check for HEAD
  branch: correctly reject refs/heads/{-dash,HEAD}
  branch: split validate_new_branchname() into two
  branch: streamline "attr_only" handling in validate_new_branchname()
2 parent s 5f9953d + 662a4c8
Raw File
Tip revision: 16169285f1e63f6a3d9ec10e48f55d6825d3156b authored by Junio C Hamano on 28 November 2017, 04:41:49 UTC
Merge branch 'jc/branch-name-sanity'
Tip revision: 1616928
decorate.h
#ifndef DECORATE_H
#define DECORATE_H

struct object_decoration {
	const struct object *base;
	void *decoration;
};

struct decoration {
	const char *name;
	unsigned int size, nr;
	struct object_decoration *hash;
};

extern void *add_decoration(struct decoration *n, const struct object *obj, void *decoration);
extern void *lookup_decoration(struct decoration *n, const struct object *obj);

#endif
back to top