From: Johannes Schindelin Date: Thu, 27 Oct 2005 17:40:12 GMT Subject: [TENTATIVE PATCH] Complain loudly, dying, when a ref is invalid Message-ID: for_each_ref() used to ignore refs which point nowhere. Making git-fsck-objects be happy about them. Signed-off-by: Johannes Schindelin --- Of course, it may be by design. But then, it does not feel right to me. If this is intended behaviour, please don't let me die dumb. refs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) applies-to: d29f6558d14b1da55642659c9874d4f52dac18bf 047627834b0ecb7ec0e0a98066b4b28688c374bc diff --git a/refs.c b/refs.c index a52b038..d74ede9 100644 --- a/refs.c +++ b/refs.c @@ -194,9 +194,9 @@ static int do_for_each_ref(const char *b continue; } if (read_ref(git_path("%s", path), sha1) < 0) - continue; + die("%s points nowhere!", path); if (!has_sha1_file(sha1)) - continue; + die("%s does not point to a valid commit object!", path); retval = fn(path, sha1); if (retval) break; --- 0.99.8.GIT