* If no_checkout is non-zero, the bisection process does not
* checkout the trial commit but instead simply updates BISECT_HEAD.
*/
int bisect_next_all(const char *prefix, int no_checkout)
int bisect_next_all(struct repository *r, const char *prefix, int no_checkout)
{
struct rev_info revs;
struct commit_list *tried;
@ -957,9 +965,9 @@ int bisect_next_all(const char *prefix, int no_checkout)
@@ -957,9 +965,9 @@ int bisect_next_all(const char *prefix, int no_checkout)
@ -993,7 +1001,7 @@ int bisect_next_all(const char *prefix, int no_checkout)
@@ -993,7 +1001,7 @@ int bisect_next_all(const char *prefix, int no_checkout)
exit_if_skipped_commits(tried, current_bad_oid);
printf("%s is the first %s commit\n", oid_to_hex(bisect_rev),
@ -60,7 +64,7 @@ extern int validate_new_branchname(const char *name, struct strbuf *ref, int for
@@ -60,7 +64,7 @@ extern int validate_new_branchname(const char *name, struct strbuf *ref, int for
* Remove information about the state of working on the current
* branch. (E.g., MERGE_HEAD)
*/
void remove_branch_state(void);
void remove_branch_state(struct repository *r);
/*
* Configure local branch "local" as downstream to branch "remote"
@ -95,7 +95,7 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)
@@ -95,7 +95,7 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)
@ -127,7 +127,9 @@ static int list_refs(struct ref_list *r, int argc, const char **argv)
@@ -127,7 +127,9 @@ static int list_refs(struct ref_list *r, int argc, const char **argv)
/* Remember to update object flag allocation in object.h */
#define PREREQ_MARK (1u<<16)
int verify_bundle(struct bundle_header *header, int verbose)
int verify_bundle(struct repository *r,
struct bundle_header *header,
int verbose)
{
/*
* Do fast check, then if any prereqs are missing then go line by line
@ -140,10 +142,10 @@ int verify_bundle(struct bundle_header *header, int verbose)
@@ -140,10 +142,10 @@ int verify_bundle(struct bundle_header *header, int verbose)
int i, ret = 0, req_nr;
const char *message = _("Repository lacks these prerequisite commits:");
@ -168,7 +170,7 @@ int verify_bundle(struct bundle_header *header, int verbose)
@@ -168,7 +170,7 @@ int verify_bundle(struct bundle_header *header, int verbose)
assert(o); /* otherwise we'd have returned early */
if (o->flags & SHOWN)
continue;
@ -180,7 +182,7 @@ int verify_bundle(struct bundle_header *header, int verbose)
@@ -180,7 +182,7 @@ int verify_bundle(struct bundle_header *header, int verbose)
/* Clean up objects used, as they will be reused. */
/* init revs to list objects for pack-objects later */
save_commit_buffer = 0;
repo_init_revisions(the_repository, &revs, NULL);
repo_init_revisions(r, &revs, NULL);
/* write prerequisites */
if (compute_and_write_prerequisites(bundle_fd, &revs, argc, argv))
@ -479,7 +480,8 @@ err:
@@ -479,7 +480,8 @@ err:
return -1;
}
int unbundle(struct bundle_header *header, int bundle_fd, int flags)
int unbundle(struct repository *r, struct bundle_header *header,
int bundle_fd, int flags)
{
const char *argv_index_pack[] = {"index-pack",
"--fix-thin", "--stdin", NULL, NULL};
@ -488,7 +490,7 @@ int unbundle(struct bundle_header *header, int bundle_fd, int flags)
@@ -488,7 +490,7 @@ int unbundle(struct bundle_header *header, int bundle_fd, int flags)
@ -882,7 +882,7 @@ static int is_rerere_enabled(void)
@@ -882,7 +882,7 @@ static int is_rerere_enabled(void)
return 1;
}
int setup_rerere(struct string_list *merge_rr, int flags)
int setup_rerere(struct repository *r, struct string_list *merge_rr, int flags)
{
int fd;
@ -896,9 +896,9 @@ int setup_rerere(struct string_list *merge_rr, int flags)
@@ -896,9 +896,9 @@ int setup_rerere(struct string_list *merge_rr, int flags)
fd = 0;
else
fd = hold_lock_file_for_update(&write_lock,
git_path_merge_rr(the_repository),
git_path_merge_rr(r),
LOCK_DIE_ON_ERROR);
read_rr(merge_rr);
read_rr(r, merge_rr);
return fd;
}
@ -912,7 +912,7 @@ int repo_rerere(struct repository *r, int flags)
@@ -912,7 +912,7 @@ int repo_rerere(struct repository *r, int flags)
@ -154,7 +154,7 @@ static int fetch_refs_from_bundle(struct transport *transport,
@@ -154,7 +154,7 @@ static int fetch_refs_from_bundle(struct transport *transport,
@ -1105,7 +1105,8 @@ static int run_pre_push_hook(struct transport *transport,
@@ -1105,7 +1105,8 @@ static int run_pre_push_hook(struct transport *transport,
return ret;
}
int transport_push(struct transport *transport,
int transport_push(struct repository *r,
struct transport *transport,
struct refspec *rs, int flags,
unsigned int *reject_reasons)
{
@ -1172,7 +1173,7 @@ int transport_push(struct transport *transport,
@@ -1172,7 +1173,7 @@ int transport_push(struct transport *transport,
oid_array_append(&commits,
&ref->new_oid);
if (!push_unpushed_submodules(the_repository,
if (!push_unpushed_submodules(r,
&commits,
transport->remote,
rs,
@ -1197,7 +1198,7 @@ int transport_push(struct transport *transport,
@@ -1197,7 +1198,7 @@ int transport_push(struct transport *transport,
@ -223,7 +223,8 @@ void transport_set_verbosity(struct transport *transport, int verbosity,
@@ -223,7 +223,8 @@ void transport_set_verbosity(struct transport *transport, int verbosity,