git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 1/3] fsck: minor typofix
Date: Mon, 27 Jun 2011 10:50:57 -0700	[thread overview]
Message-ID: <1309197059-7177-1-git-send-email-gitster@pobox.com> (raw)

There are two places that diagnose the same kind of error in mark_object(),
that receives an object, the type the object is expected to be, and the
object that refers to it (IOW, the reason why we want to make sure that
the first object is in a good order). When the object that is referred to
is missing, we report "broken link from X; broken link to Y".

However, one of the two places, that is used much less often, said "broken
link from X; broken link from Y".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

 This rarely used codepath is triggered only when fsck_walk() calls this
 function that is set as a callback in traverse_one_object() from one of
 the type specific scanners, e.g. fsck_walk_tree(), and an object that is
 referred to is of a wrong type, e.g. a tree entry with mode 100644 is
 looked up with lookup_blob(), and the type of the named object is already
 known to us to be something different. The look-up code issues an unrelated
 error message in such a case, but then this codepath does not know what the
 object name of the offending object was.
---
 builtin/fsck.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin/fsck.c b/builtin/fsck.c
index 5ae0366..64f30d4 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -83,7 +83,7 @@ static int mark_object(struct object *obj, int type, void *data)
 		/* ... these references to parent->fld are safe here */
 		printf("broken link from %7s %s\n",
 			   typename(parent->type), sha1_to_hex(parent->sha1));
-		printf("broken link from %7s %s\n",
+		printf("broken link to %7s %s\n",
 			   (type == OBJ_ANY ? "unknown" : typename(type)), "unknown");
 		errors_found |= ERROR_REACHABLE;
 		return 1;
-- 
1.7.6

             reply	other threads:[~2011-06-27 17:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27 17:50 Junio C Hamano [this message]
2011-06-27 17:50 ` [PATCH 2/3] fsck: clarify semantics of mark_object_reachable() Junio C Hamano
2011-06-27 17:50 ` [PATCH 3/3] object: reclaim one bit in the flags field Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1309197059-7177-1-git-send-email-gitster@pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).