diff options
author | Junio C Hamano <junkio@cox.net> | 2006-03-01 01:34:00 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-03-01 01:34:00 -0800 |
commit | dcf7e417c6ae8d6a3ec06967bf87aadd34dbeb72 (patch) | |
tree | cd10b22fd136a271f9bf3e6bb911a05ef9797e70 | |
parent | 6ecc321ba5d8f89a8dd0a9a11d264d03ab624dc1 (diff) | |
parent | c401cb48e77459a4ccad76888ad31bef252facc5 (diff) | |
download | git-dcf7e417c6ae8d6a3ec06967bf87aadd34dbeb72.tar.gz |
Merge branch 'js/refs' into next
* js/refs:
Warn about invalid refs
-rw-r--r-- | refs.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -151,10 +151,15 @@ static int do_for_each_ref(const char *base, int (*fn)(const char *path, const u break; continue; } - if (read_ref(git_path("%s", path), sha1) < 0) + if (read_ref(git_path("%s", path), sha1) < 0) { + fprintf(stderr, "%s points nowhere!", path); continue; - if (!has_sha1_file(sha1)) + } + if (!has_sha1_file(sha1)) { + fprintf(stderr, "%s does not point to a valid " + "commit object!", path); continue; + } retval = fn(path, sha1); if (retval) break; |