Commit Diff


commit - 1df1761f7094815d15b11a908b2132ca58169fea
commit + 2f3ccc5ff648594ff13619e304c2a139a917f2d2
blob - 63ca6d274ce665df8f732c43075f6e6a0954e540
blob + 15e5b266956d19bd23a769396c8fff3d1be22e22
--- lib/reference.c
+++ lib/reference.c
@@ -920,6 +920,8 @@ gather_on_disk_refs(struct got_reflist_head *refs, con
 		case DT_REG:
 			err = open_ref(&ref, path_refs, subdir, dent->d_name,
 			    0, got_repo_get_object_format(repo));
+			if (err && err->code == GOT_ERR_BAD_REF_NAME)
+				break;
 			if (err)
 				goto done;
 			if (ref) {