diff options
Diffstat (limited to 'builtin/for-each-ref.c')
-rw-r--r-- | builtin/for-each-ref.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c index f7e51a7fa..cb7db230d 100644 --- a/builtin/for-each-ref.c +++ b/builtin/for-each-ref.c @@ -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); |