int i;
int new_refs;
struct ref *ref, *local_refs = NULL;
+ const char *gitdir;
CALLOC_ARRAY(repo, 1);
if (delete_branch && rs.nr != 1)
die("You must specify only one branch name when deleting a remote branch");
- setup_git_directory();
+ gitdir = setup_git_directory();
memset(remote_dir_exists, -1, 256);
if (!push_all && !is_null_oid(&ref->old_oid))
strvec_pushf(&commit_argv, "^%s",
oid_to_hex(&ref->old_oid));
- repo_init_revisions(the_repository, &revs, setup_git_directory());
+ repo_init_revisions(the_repository, &revs, gitdir);
setup_revisions_from_strvec(&commit_argv, &revs, NULL);
revs.edge_hint = 0; /* just in case */