While resolving references, if a reference is found that is in an
unrecognized format, emit a warning (and then fail, as before).
Wouldn't *you* want to know?
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ssize_t len;
char buffer[256];
static char ref_buffer[256];
+ char path[PATH_MAX];
if (flag)
*flag = 0;
return NULL;
for (;;) {
- char path[PATH_MAX];
struct stat st;
char *buf;
int fd;
if (flag)
*flag |= REF_ISSYMREF;
}
- if (get_sha1_hex(buffer, sha1))
+ if (get_sha1_hex(buffer, sha1)) {
+ warning("reference in %s is formatted incorrectly", path);
return NULL;
+ }
return ref;
}