strbuf_setlen(path, baselen);
continue;
}
- if (!prefixcmp(de->d_name, "tmp_obj_")) {
+ if (starts_with(de->d_name, "tmp_obj_")) {
strbuf_addf(path, "/%s", de->d_name);
prune_tmp_file(path->buf);
strbuf_setlen(path, baselen);
return;
}
while ((de = readdir(dir)) != NULL)
- if (!prefixcmp(de->d_name, "tmp_"))
+ if (starts_with(de->d_name, "tmp_"))
prune_tmp_file(mkpath("%s/%s", path, de->d_name));
closedir(dir);
}
s = mkpathdup("%s/pack", get_object_directory());
remove_temporary_files(s);
free(s);
+
+ if (is_repository_shallow())
+ prune_shallow(show_only);
+
return 0;
}