if (oidset_insert(seen, oid))
return 0;
path = ".have";
+ } else {
+ oidset_insert(seen, oid);
}
show_ref(path, oid->hash);
return 0;
{
static struct oidset seen = OIDSET_INIT;
+ for_each_ref(show_ref_cb, &seen);
for_each_alternate_ref(show_one_alternate_ref, &seen);
oidset_clear(&seen);
- for_each_ref(show_ref_cb, &seen);
if (!sent_capabilities)
show_ref("capabilities^{}", null_sha1);
{
struct check_connected_options opt = CHECK_CONNECTED_INIT;
struct command *cmd;
- unsigned char sha1[20];
+ struct object_id oid;
struct iterate_data data;
struct async muxer;
int err_fd = 0;
check_aliased_updates(commands);
free(head_name_to_free);
- head_name = head_name_to_free = resolve_refdup("HEAD", 0, sha1, NULL);
+ head_name = head_name_to_free = resolve_refdup("HEAD", 0, oid.hash, NULL);
if (use_atomic)
execute_commands_atomic(commands, si);
}
tmp_objdir = tmp_objdir_create();
- if (!tmp_objdir)
+ if (!tmp_objdir) {
+ if (err_fd > 0)
+ close(err_fd);
return "unable to create temporary object directory";
+ }
child.env = tmp_objdir_env(tmp_objdir);
/*