FILE *fp = NULL;
safe_create_leading_directories(path);
- fd = mkstemp(tmp);
+ fd = git_mkstemp_mode(tmp, 0666);
if (fd < 0)
goto out;
fp = fdopen(fd, "w");
static int generate_info_refs(FILE *fp)
{
- return for_each_ref(add_info_ref, fp);
+ struct each_ref_fn_sha1_adapter wrapped_add_info_ref =
+ {add_info_ref, fp};
+
+ return for_each_ref(each_ref_fn_adapter, &wrapped_add_info_ref);
}
static int update_info_refs(int force)