diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2006-02-28 22:16:01 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-03-01 01:15:12 -0800 |
commit | c401cb48e77459a4ccad76888ad31bef252facc5 (patch) | |
tree | 44a34acdd16f7a432187565d6ffb46210307196c /refs.c | |
parent | 858cbfbabe4ede5f5eba32041eb7448319e53e2a (diff) | |
download | git-c401cb48e77459a4ccad76888ad31bef252facc5.tar.gz git-c401cb48e77459a4ccad76888ad31bef252facc5.tar.xz |
Warn about invalid refs
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.c')
-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; |