Merge branch 'jk/rev-list-no-bitmap-while-pruning'
[gitweb.git] / builtin / for-each-ref.c
index f7e51a7fadc40b1e4484a657fc55af8a3043967c..cb7db230d3ef76ee6a8b73971cbdabcc6d6590a9 100644 (file)
@@ -866,6 +866,11 @@ static int grab_single_ref(const char *refname, const struct object_id *oid,
                  return 0;
        }
 
+       if (flag & REF_ISBROKEN) {
+                 warning("ignoring broken ref %s", refname);
+                 return 0;
+       }
+
        if (*cb->grab_pattern) {
                const char **pattern;
                int namelen = strlen(refname);