diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-12-05 21:23:32 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-12-05 21:23:32 +0900 |
| commit | ecde85d2386c9ff89009e32a1d8824c434cd4a86 (patch) | |
| tree | 224cdbdb274ed14acbb778d9351ea3ce729f12dd /http-push.c | |
| parent | f0ef5b6d9bcc258e4cbef93839d1b7465d5212b9 (diff) | |
| parent | ac65c70663b092e823b0d3de1c1cfdee0a4fbc8e (diff) | |
| download | git-ecde85d2386c9ff89009e32a1d8824c434cd4a86.tar.xz | |
Merge branch 'ps/object-source-management' into ps/odb-misc-fixes
* ps/object-source-management:
odb: handle recreation of quarantine directories
odb: handle changing a repository's commondir
chdir-notify: add function to unregister listeners
odb: handle initialization of sources in `odb_new()`
http-push: stop setting up `the_repository` for each reference
t/helper: stop setting up `the_repository` repeatedly
builtin/index-pack: fix deferred fsck outside repos
oidset: introduce `oidset_equal()`
odb: move logic to disable ref updates into repo
odb: refactor `odb_clear()` to `odb_free()`
odb: adopt logic to close object databases
setup: convert `set_git_dir()` to have file scope
path: move `enter_repo()` into "setup.c"
Diffstat (limited to 'http-push.c')
| -rw-r--r-- | http-push.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/http-push.c b/http-push.c index d86ce77119..60a9b75620 100644 --- a/http-push.c +++ b/http-push.c @@ -1725,6 +1725,7 @@ int cmd_main(int argc, const char **argv) int i; int new_refs; struct ref *ref, *local_refs = NULL; + const char *gitdir; CALLOC_ARRAY(repo, 1); @@ -1787,7 +1788,7 @@ int cmd_main(int argc, const char **argv) 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); @@ -1941,7 +1942,7 @@ int cmd_main(int argc, const char **argv) 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 */ |
