* directory if it is missing; otherwise, return NULL if the desired
* directory cannot be found.
*/
* directory if it is missing; otherwise, return NULL if the desired
* directory cannot be found.
*/
-static struct ref_entry *search_for_subdir(struct ref_dir *dir,
- const char *subdirname, int mkdir)
+static struct ref_dir *search_for_subdir(struct ref_dir *dir,
+ const char *subdirname, int mkdir)
entry = create_dir_entry(subdirname);
add_entry_to_dir(dir, entry);
}
entry = create_dir_entry(subdirname);
add_entry_to_dir(dir, entry);
}
const char *slash;
strbuf_init(&dirname, PATH_MAX);
for (slash = strchr(refname, '/'); slash; slash = strchr(slash + 1, '/')) {
const char *slash;
strbuf_init(&dirname, PATH_MAX);
for (slash = strchr(refname, '/'); slash; slash = strchr(slash + 1, '/')) {
} else if (S_ISDIR(st.st_mode)) {
strbuf_addch(&refname, '/');
read_loose_refs(refs, refname.buf,
} else if (S_ISDIR(st.st_mode)) {
strbuf_addch(&refname, '/');
read_loose_refs(refs, refname.buf,
if (!refs->loose) {
refs->loose = create_dir_entry("");
read_loose_refs(refs, "refs/",
if (!refs->loose) {
refs->loose = create_dir_entry("");
read_loose_refs(refs, "refs/",