mirror of
https://github.com/git/git
synced 2024-10-30 04:01:21 +00:00
37fde874c2
Again I left the v2.6.11-tree tag behind. My bad. This commit makes sure that we do not barf when pushing a ref that is a non-commitish tag. You can update a remote ref under the following conditions: * You can always use --force. * Creating a brand new ref is OK. * If the remote ref is exactly the same as what you are pushing, it is OK (nothing is pushed). * You can replace a commitish with another commitish which is a descendant of it, if you can verify the ancestry between them; this and the above means you have to have what you are replacing. * Otherwise you cannot update; you need to use --force. Signed-off-by: Junio C Hamano <junkio@cox.net>
20 lines
452 B
C
20 lines
452 B
C
#ifndef TAG_H
|
|
#define TAG_H
|
|
|
|
#include "object.h"
|
|
|
|
extern const char *tag_type;
|
|
|
|
struct tag {
|
|
struct object object;
|
|
struct object *tagged;
|
|
char *tag;
|
|
char *signature; /* not actually implemented */
|
|
};
|
|
|
|
extern struct tag *lookup_tag(const unsigned char *sha1);
|
|
extern int parse_tag_buffer(struct tag *item, void *data, unsigned long size);
|
|
extern int parse_tag(struct tag *item);
|
|
extern struct object *deref_tag(struct object *);
|
|
|
|
#endif /* TAG_H */
|