diff options
Diffstat (limited to 'reachable.c')
-rw-r--r-- | reachable.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/reachable.c b/reachable.c index 59196253a6..d0199cace4 100644 --- a/reachable.c +++ b/reachable.c @@ -25,9 +25,15 @@ static void update_progress(struct connectivity_progress *cp) static int add_one_ref(const char *path, const struct object_id *oid, int flag, void *cb_data) { - struct object *object = parse_object_or_die(oid->hash, path); struct rev_info *revs = (struct rev_info *)cb_data; + struct object *object; + if ((flag & REF_ISSYMREF) && (flag & REF_ISBROKEN)) { + warning("symbolic ref is dangling: %s", path); + return 0; + } + + object = parse_object_or_die(oid->hash, path); add_pending_object(revs, object, ""); return 0; @@ -113,8 +119,7 @@ static int add_recent_loose(const unsigned char *sha1, */ if (errno == ENOENT) return 0; - return error("unable to stat %s: %s", - sha1_to_hex(sha1), strerror(errno)); + return error_errno("unable to stat %s", sha1_to_hex(sha1)); } add_recent_object(sha1, st.st_mtime, data); |