git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TENTATIVE PATCH] Complain loudly, dying, when a ref is invalid
@ 2005-10-27 17:40 Johannes Schindelin
  2005-10-27 19:01 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Schindelin @ 2005-10-27 17:40 UTC (permalink / raw)
  To: git

for_each_ref() used to ignore refs which point nowhere. Making git-fsck-objects
be happy about them.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

---

	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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-02-28 21:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-27 17:40 [TENTATIVE PATCH] Complain loudly, dying, when a ref is invalid Johannes Schindelin
2005-10-27 19:01 ` Junio C Hamano
2005-10-27 19:28   ` Johannes Schindelin
2005-10-27 20:45     ` Junio C Hamano
2006-02-28 21:16       ` [PATCH] Warn about invalid refs Johannes Schindelin
2005-10-27 21:13   ` [TENTATIVE PATCH] Complain loudly, dying, when a ref is invalid Horst von Brand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).