git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 156/194] migrate cached path to use the_repository

From
Stefan Beller <sbeller@google.com>
Date
Feb 6, 2018, 00:17 UTC
Message-ID
<20180206001749.218943-58-sbeller@google.com>
In-Reply-To
<20180206001749.218943-1-sbeller@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
---
 blame.c                              |  8 ++++---
 branch.c                             | 14 ++++++------
 builtin/commit.c                     | 38 +++++++++++++++----------------
 builtin/fetch.c                      |  4 ++--
 builtin/merge.c                      | 37 +++++++++++++++---------------
 builtin/pull.c                       |  4 ++--
 builtin/reset.c                      |  2 +-
 contrib/coccinelle/cached_path.cocci | 44 ++++++++++++++++++++++++++++++++++++
 fetch-pack.c                         |  2 +-
 path.c                               | 18 +++++++--------
 path.h                               | 40 ++++++++++++++++++++++++--------
 repository.c                         |  2 +-
 repository.h                         |  5 ++++
 rerere.c                             |  7 +++---
 sequencer.c                          | 33 ++++++++++++++-------------
 shallow.c                            | 12 ++++++----
 wt-status.c                          |  8 +++----
 17 files changed, 178 insertions(+), 100 deletions(-)
 create mode 100644 contrib/coccinelle/cached_path.cocci
diff --git a/blame.c b/blame.c
index 1cd39e7a17..6832271319 100644
--- a/blame.c
+++ b/blame.c
@@ -112,17 +112,19 @@ static void append_merge_parents(struct commit_list **tail)
 	int merge_head;
 	struct strbuf line = STRBUF_INIT;
 
-	merge_head = open(git_path_merge_head(), O_RDONLY);
+	merge_head = open(git_path_merge_head(the_repository), O_RDONLY);
 	if (merge_head < 0) {
 		if (errno == ENOENT)
 			return;
-		die("cannot open '%s' for reading", git_path_merge_head());
+		die("cannot open '%s' for reading",
+		    git_path_merge_head(the_repository));
 	}
 
 	while (!strbuf_getwholeline_fd(&line, merge_head, '\n')) {
 		struct object_id oid;
 		if (line.len < GIT_SHA1_HEXSZ || get_oid_hex(line.buf, &oid))
-			die("unknown line in '%s': %s", git_path_merge_head(), line.buf);
+			die("unknown line in '%s': %s",
+			    git_path_merge_head(the_repository), line.buf);
 		tail = append_parent(tail, &oid);
 	}
 	close(merge_head);
diff --git a/branch.c b/branch.c
index 0b7aaa1aca..08d4efc1be 100644
--- a/branch.c
+++ b/branch.c
@@ -339,13 +339,13 @@ void create_branch(const char *name, const char *start_name,
 
 void remove_branch_state(void)
 {
-	unlink(git_path_cherry_pick_head());
-	unlink(git_path_revert_head());
-	unlink(git_path_merge_head());
-	unlink(git_path_merge_rr());
-	unlink(git_path_merge_msg());
-	unlink(git_path_merge_mode());
-	unlink(git_path_squash_msg());
+	unlink(git_path_cherry_pick_head(the_repository));
+	unlink(git_path_revert_head(the_repository));
+	unlink(git_path_merge_head(the_repository));
+	unlink(git_path_merge_rr(the_repository));
+	unlink(git_path_merge_msg(the_repository));
+	unlink(git_path_merge_mode(the_repository));
+	unlink(git_path_squash_msg(the_repository));
 }
 
 void die_if_checked_out(const char *branch, int ignore_current_worktree)
diff --git a/builtin/commit.c b/builtin/commit.c
index d15592ad45..cceb965569 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -179,9 +179,9 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)
 
 static void determine_whence(struct wt_status *s)
 {
-	if (file_exists(git_path_merge_head()))
+	if (file_exists(git_path_merge_head(the_repository)))
 		whence = FROM_MERGE;
-	else if (file_exists(git_path_cherry_pick_head())) {
+	else if (file_exists(git_path_cherry_pick_head(the_repository))) {
 		whence = FROM_CHERRY_PICK;
 		if (file_exists(git_path_seq_dir()))
 			sequencer_in_use = 1;
@@ -732,21 +732,21 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
 		format_commit_message(commit, "fixup! %s\n\n",
 				      &sb, &ctx);
 		hook_arg1 = "message";
-	} else if (!stat(git_path_merge_msg(), &statbuf)) {
+	} else if (!stat(git_path_merge_msg(the_repository), &statbuf)) {
 		/*
 		 * prepend SQUASH_MSG here if it exists and a
 		 * "merge --squash" was originally performed
 		 */
-		if (!stat(git_path_squash_msg(), &statbuf)) {
-			if (strbuf_read_file(&sb, git_path_squash_msg(), 0) < 0)
+		if (!stat(git_path_squash_msg(the_repository), &statbuf)) {
+			if (strbuf_read_file(&sb, git_path_squash_msg(the_repository), 0) < 0)
 				die_errno(_("could not read SQUASH_MSG"));
 			hook_arg1 = "squash";
 		} else
 			hook_arg1 = "merge";
-		if (strbuf_read_file(&sb, git_path_merge_msg(), 0) < 0)
+		if (strbuf_read_file(&sb, git_path_merge_msg(the_repository), 0) < 0)
 			die_errno(_("could not read MERGE_MSG"));
-	} else if (!stat(git_path_squash_msg(), &statbuf)) {
-		if (strbuf_read_file(&sb, git_path_squash_msg(), 0) < 0)
+	} else if (!stat(git_path_squash_msg(the_repository), &statbuf)) {
+		if (strbuf_read_file(&sb, git_path_squash_msg(the_repository), 0) < 0)
 			die_errno(_("could not read SQUASH_MSG"));
 		hook_arg1 = "squash";
 	} else if (template_file) {
@@ -827,8 +827,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
 					"	%s\n"
 					"and try again.\n"),
 				whence == FROM_MERGE ?
-					git_path_merge_head() :
-					git_path_cherry_pick_head());
+					git_path_merge_head(the_repository) :
+					git_path_cherry_pick_head(the_repository));
 		}
 
 		fprintf(s->fp, "\n");
@@ -1732,7 +1732,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
 		if (!reflog_msg)
 			reflog_msg = "commit (merge)";
 		pptr = commit_list_append(current_head, pptr);
-		fp = xfopen(git_path_merge_head(), "r");
+		fp = xfopen(git_path_merge_head(the_repository), "r");
 		while (strbuf_getline_lf(&m, fp) != EOF) {
 			struct commit *parent;
 
@@ -1743,8 +1743,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
 		}
 		fclose(fp);
 		strbuf_release(&m);
-		if (!stat(git_path_merge_mode(), &statbuf)) {
-			if (strbuf_read_file(&sb, git_path_merge_mode(), 0) < 0)
+		if (!stat(git_path_merge_mode(the_repository), &statbuf)) {
+			if (strbuf_read_file(&sb, git_path_merge_mode(the_repository), 0) < 0)
 				die_errno(_("could not read MERGE_MODE"));
 			if (!strcmp(sb.buf, "no-ff"))
 				allow_fast_forward = 0;
@@ -1820,12 +1820,12 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
 	}
 	ref_transaction_free(transaction);
 
-	unlink(git_path_cherry_pick_head());
-	unlink(git_path_revert_head());
-	unlink(git_path_merge_head());
-	unlink(git_path_merge_msg());
-	unlink(git_path_merge_mode());
-	unlink(git_path_squash_msg());
+	unlink(git_path_cherry_pick_head(the_repository));
+	unlink(git_path_revert_head(the_repository));
+	unlink(git_path_merge_head(the_repository));
+	unlink(git_path_merge_msg(the_repository));
+	unlink(git_path_merge_mode(the_repository));
+	unlink(git_path_squash_msg(the_repository));
 
 	if (commit_index_files())
 		die (_("Repository has been updated, but unable to write\n"
diff --git a/builtin/fetch.c b/builtin/fetch.c
index da99363067..b516b176f0 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -756,7 +756,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 	const char *what, *kind;
 	struct ref *rm;
 	char *url;
-	const char *filename = dry_run ? "/dev/null" : git_path_fetch_head();
+	const char *filename = dry_run ? "/dev/null" : git_path_fetch_head(the_repository);
 	int want_status;
 	int summary_width = transport_summary_width(ref_map);
 
@@ -1009,7 +1009,7 @@ static void check_not_current_branch(struct ref *ref_map)
 
 static int truncate_fetch_head(void)
 {
-	const char *filename = git_path_fetch_head();
+	const char *filename = git_path_fetch_head(the_repository);
 	FILE *fp = fopen_for_writing(filename);
 
 	if (!fp)
diff --git a/builtin/merge.c b/builtin/merge.c
index 30264cfd7c..4f5c01c41c 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -244,9 +244,9 @@ static struct option builtin_merge_options[] = {
 /* Cleans up metadata that is uninteresting after a succeeded merge. */
 static void drop_save(void)
 {
-	unlink(git_path_merge_head());
-	unlink(git_path_merge_msg());
-	unlink(git_path_merge_mode());
+	unlink(git_path_merge_head(the_repository));
+	unlink(git_path_merge_msg(the_repository));
+	unlink(git_path_merge_mode(the_repository));
 }
 
 static int save_state(struct object_id *stash)
@@ -379,7 +379,7 @@ static void squash_message(struct commit *commit, struct commit_list *remotehead
 			oid_to_hex(&commit->object.oid));
 		pretty_print_commit(&ctx, commit, &out);
 	}
-	write_file_buf(git_path_squash_msg(), out.buf, out.len);
+	write_file_buf(git_path_squash_msg(the_repository), out.buf, out.len);
 	strbuf_release(&out);
 }
 
@@ -742,7 +742,7 @@ static void add_strategies(const char *string, unsigned attr)
 
 static void read_merge_msg(struct strbuf *msg)
 {
-	const char *filename = git_path_merge_msg();
+	const char *filename = git_path_merge_msg(the_repository);
 	strbuf_reset(msg);
 	if (strbuf_read_file(msg, filename, 0) < 0)
 		die_errno(_("Could not read from '%s'"), filename);
@@ -779,18 +779,18 @@ static void prepare_to_commit(struct commit_list *remoteheads)
 	if (signoff)
 		append_signoff(&msg, ignore_non_trailer(msg.buf, msg.len), 0);
 	write_merge_heads(remoteheads);
-	write_file_buf(git_path_merge_msg(), msg.buf, msg.len);
+	write_file_buf(git_path_merge_msg(the_repository), msg.buf, msg.len);
 	if (run_commit_hook(0 < option_edit, get_index_file(), "prepare-commit-msg",
-			    git_path_merge_msg(), "merge", NULL))
+			    git_path_merge_msg(the_repository), "merge", NULL))
 		abort_commit(remoteheads, NULL);
 	if (0 < option_edit) {
-		if (launch_editor(git_path_merge_msg(), NULL, NULL))
+		if (launch_editor(git_path_merge_msg(the_repository), NULL, NULL))
 			abort_commit(remoteheads, NULL);
 	}
 
 	if (verify_msg && run_commit_hook(0 < option_edit, get_index_file(),
 					  "commit-msg",
-					  git_path_merge_msg(), NULL))
+					  git_path_merge_msg(the_repository), NULL))
 		abort_commit(remoteheads, NULL);
 
 	read_merge_msg(&msg);
@@ -861,7 +861,7 @@ static int suggest_conflicts(void)
 	FILE *fp;
 	struct strbuf msgbuf = STRBUF_INIT;
 
-	filename = git_path_merge_msg();
+	filename = git_path_merge_msg(the_repository);
 	fp = xfopen(filename, "a");
 
 	append_conflicts_hint(&msgbuf);
@@ -941,12 +941,12 @@ static void write_merge_heads(struct commit_list *remoteheads)
 		}
 		strbuf_addf(&buf, "%s\n", oid_to_hex(oid));
 	}
-	write_file_buf(git_path_merge_head(), buf.buf, buf.len);
+	write_file_buf(git_path_merge_head(the_repository), buf.buf, buf.len);
 
 	strbuf_reset(&buf);
 	if (fast_forward == FF_NO)
 		strbuf_addstr(&buf, "no-ff");
-	write_file_buf(git_path_merge_mode(), buf.buf, buf.len);
+	write_file_buf(git_path_merge_mode(the_repository), buf.buf, buf.len);
 	strbuf_release(&buf);
 }
 
@@ -954,7 +954,8 @@ static void write_merge_state(struct commit_list *remoteheads)
 {
 	write_merge_heads(remoteheads);
 	strbuf_addch(&merge_msg, '\n');
-	write_file_buf(git_path_merge_msg(), merge_msg.buf, merge_msg.len);
+	write_file_buf(git_path_merge_msg(the_repository), merge_msg.buf,
+		       merge_msg.len);
 }
 
 static int default_edit_option(void)
@@ -1037,7 +1038,7 @@ static void handle_fetch_head(struct commit_list **remotes, struct strbuf *merge
 	if (!merge_names)
 		merge_names = &fetch_head_file;
 
-	filename = git_path_fetch_head();
+	filename = git_path_fetch_head(the_repository);
 	fd = open(filename, O_RDONLY);
 	if (fd < 0)
 		die_errno(_("could not open '%s' for reading"), filename);
@@ -1174,7 +1175,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 			usage_msg_opt(_("--abort expects no arguments"),
 			      builtin_merge_usage, builtin_merge_options);
 
-		if (!file_exists(git_path_merge_head()))
+		if (!file_exists(git_path_merge_head(the_repository)))
 			die(_("There is no merge to abort (MERGE_HEAD missing)."));
 
 		/* Invoke 'git reset --merge' */
@@ -1190,7 +1191,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 			usage_msg_opt(_("--continue expects no arguments"),
 			      builtin_merge_usage, builtin_merge_options);
 
-		if (!file_exists(git_path_merge_head()))
+		if (!file_exists(git_path_merge_head(the_repository)))
 			die(_("There is no merge in progress (MERGE_HEAD missing)."));
 
 		/* Invoke 'git commit' */
@@ -1201,7 +1202,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 	if (read_cache_unmerged())
 		die_resolve_conflict("merge");
 
-	if (file_exists(git_path_merge_head())) {
+	if (file_exists(git_path_merge_head(the_repository))) {
 		/*
 		 * There is no unmerged entry, don't advise 'git
 		 * add/rm <file>', just 'git commit'.
@@ -1212,7 +1213,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 		else
 			die(_("You have not concluded your merge (MERGE_HEAD exists)."));
 	}
-	if (file_exists(git_path_cherry_pick_head())) {
+	if (file_exists(git_path_cherry_pick_head(the_repository))) {
 		if (advice_resolve_conflict)
 			die(_("You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
 			    "Please, commit your changes before you merge."));
diff --git a/builtin/pull.c b/builtin/pull.c
index 90aa922260..0fb48a33be 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -351,7 +351,7 @@ static int git_pull_config(const char *var, const char *value, void *cb)
  */
 static void get_merge_heads(struct oid_array *merge_heads)
 {
-	const char *filename = git_path_fetch_head();
+	const char *filename = git_path_fetch_head(the_repository);
 	FILE *fp;
 	struct strbuf sb = STRBUF_INIT;
 	struct object_id oid;
@@ -858,7 +858,7 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
 	if (read_cache_unmerged())
 		die_resolve_conflict("pull");
 
-	if (file_exists(git_path_merge_head()))
+	if (file_exists(git_path_merge_head(the_repository)))
 		die_conclude_merge();
 
 	if (get_oid("HEAD", &orig_head))
diff --git a/builtin/reset.c b/builtin/reset.c
index 891dd77a5f..7c57309adc 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -39,7 +39,7 @@ static const char *reset_type_names[] = {
 
 static inline int is_merge(void)
 {
-	return !access(git_path_merge_head(), F_OK);
+	return !access(git_path_merge_head(the_repository), F_OK);
 }
 
 static int reset_index(const struct object_id *oid, int reset_type, int quiet)
diff --git a/contrib/coccinelle/cached_path.cocci b/contrib/coccinelle/cached_path.cocci
new file mode 100644
index 0000000000..41f38fe922
--- /dev/null
+++ b/contrib/coccinelle/cached_path.cocci
@@ -0,0 +1,44 @@
+@@ @@
+ git_path_cherry_pick_head(
++the_repository
+ )
+
+@@ @@
+ git_path_revert_head(
++the_repository
+ )
+
+@@ @@
+ git_path_squash_msg(
++the_repository
+ )
+
+@@ @@
+ git_path_merge_msg(
++the_repository
+ )
+
+@@ @@
+ git_path_merge_rr(
++the_repository
+ )
+
+@@ @@
+ git_path_merge_mode(
++the_repository
+ )
+
+@@ @@
+ git_path_merge_head(
++the_repository
+ )
+
+@@ @@
+ git_path_fetch_head(
++the_repository
+ )
+
+@@ @@
+ git_path_shallow(
++the_repository
+ )
diff --git a/fetch-pack.c b/fetch-pack.c
index 01e5b36661..74265554c3 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1070,7 +1070,7 @@ static void update_shallow(struct fetch_pack_args *args,
 
 	if (args->deepen && alternate_shallow_file) {
 		if (*alternate_shallow_file == '\0') { /* --unshallow */
-			unlink_or_warn(git_path_shallow());
+			unlink_or_warn(git_path_shallow(the_repository));
 			rollback_lock_file(&shallow_lock);
 		} else
 			commit_lock_file(&shallow_lock);
diff --git a/path.c b/path.c
index da8b655730..8a88f145cd 100644
--- a/path.c
+++ b/path.c
@@ -1357,12 +1357,12 @@ char *xdg_cache_home(const char *filename)
 	return NULL;
 }
 
-GIT_PATH_FUNC(git_path_cherry_pick_head, "CHERRY_PICK_HEAD")
-GIT_PATH_FUNC(git_path_revert_head, "REVERT_HEAD")
-GIT_PATH_FUNC(git_path_squash_msg, "SQUASH_MSG")
-GIT_PATH_FUNC(git_path_merge_msg, "MERGE_MSG")
-GIT_PATH_FUNC(git_path_merge_rr, "MERGE_RR")
-GIT_PATH_FUNC(git_path_merge_mode, "MERGE_MODE")
-GIT_PATH_FUNC(git_path_merge_head, "MERGE_HEAD")
-GIT_PATH_FUNC(git_path_fetch_head, "FETCH_HEAD")
-GIT_PATH_FUNC(git_path_shallow, "shallow")
+REPO_GIT_PATH_FUNC(path_cherry_pick_head, "CHERRY_PICK_HEAD")
+REPO_GIT_PATH_FUNC(path_revert_head, "REVERT_HEAD")
+REPO_GIT_PATH_FUNC(path_squash_msg, "SQUASH_MSG")
+REPO_GIT_PATH_FUNC(path_merge_msg, "MERGE_MSG")
+REPO_GIT_PATH_FUNC(path_merge_rr, "MERGE_RR")
+REPO_GIT_PATH_FUNC(path_merge_mode, "MERGE_MODE")
+REPO_GIT_PATH_FUNC(path_merge_head, "MERGE_HEAD")
+REPO_GIT_PATH_FUNC(path_fetch_head, "FETCH_HEAD")
+REPO_GIT_PATH_FUNC(path_shallow, "shallow")
diff --git a/path.h b/path.h
index 1ccd0373c9..0fa6172f96 100644
--- a/path.h
+++ b/path.h
@@ -160,14 +160,36 @@ extern void report_linked_checkout_garbage(void);
 		return ret; \
 	}
 
-const char *git_path_cherry_pick_head(void);
-const char *git_path_revert_head(void);
-const char *git_path_squash_msg(void);
-const char *git_path_merge_msg(void);
-const char *git_path_merge_rr(void);
-const char *git_path_merge_mode(void);
-const char *git_path_merge_head(void);
-const char *git_path_fetch_head(void);
-const char *git_path_shallow(void);
+#define REPO_GIT_PATH_FUNC(var, filename) \
+	const char *git_##var(struct repository *r) \
+	{ \
+		if (!r->cached_paths.var) \
+			r->cached_paths.var = git_pathdup(filename); \
+		return r->cached_paths.var; \
+	}
+
+struct path_cache {
+	const char *path_cherry_pick_head;
+	const char *path_revert_head;
+	const char *path_squash_msg;
+	const char *path_merge_msg;
+	const char *path_merge_rr;
+	const char *path_merge_mode;
+	const char *path_merge_head;
+	const char *path_fetch_head;
+	const char *path_shallow;
+};
+
+#define PATH_CACHE_INIT { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
+
+const char *git_path_cherry_pick_head(struct repository *r);
+const char *git_path_revert_head(struct repository *r);
+const char *git_path_squash_msg(struct repository *r);
+const char *git_path_merge_msg(struct repository *r);
+const char *git_path_merge_rr(struct repository *r);
+const char *git_path_merge_mode(struct repository *r);
+const char *git_path_merge_head(struct repository *r);
+const char *git_path_fetch_head(struct repository *r);
+const char *git_path_shallow(struct repository *r);
 
 #endif /* PATH_H */
diff --git a/repository.c b/repository.c
index 0cf019bb9b..3ee47b4c5d 100644
--- a/repository.c
+++ b/repository.c
@@ -7,7 +7,7 @@
 
 /* The main repository */
 static struct repository the_repo = {
-	NULL, NULL, NULL, RAW_OBJECT_STORE_INIT, OBJECT_PARSER_INIT, NULL,
+	NULL, NULL, NULL, RAW_OBJECT_STORE_INIT, OBJECT_PARSER_INIT, PATH_CACHE_INIT, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, &the_index, NULL, 0, 0
 };
 struct repository *the_repository = &the_repo;
diff --git a/repository.h b/repository.h
index 74b2b27986..8de14137b4 100644
--- a/repository.h
+++ b/repository.h
@@ -43,6 +43,11 @@ struct repository {
 	 */
 	struct object_parser parsed_objects;
 
+	/*
+	 * Contains path to often used file names.
+	 */
+	struct path_cache cached_paths;
+
 	/*
 	 * The store in which the refs are hold.
 	 */
diff --git a/rerere.c b/rerere.c
index 30ca5fa56d..dc79b940c5 100644
--- a/rerere.c
+++ b/rerere.c
@@ -202,7 +202,7 @@ static struct rerere_id *new_rerere_id(unsigned char *sha1)
 static void read_rr(struct string_list *rr)
 {
 	struct strbuf buf = STRBUF_INIT;
-	FILE *in = fopen_or_warn(git_path_merge_rr(), "r");
+	FILE *in = fopen_or_warn(git_path_merge_rr(the_repository), "r");
 
 	if (!in)
 		return;
@@ -900,7 +900,8 @@ int setup_rerere(struct string_list *merge_rr, int flags)
 	if (flags & RERERE_READONLY)
 		fd = 0;
 	else
-		fd = hold_lock_file_for_update(&write_lock, git_path_merge_rr(),
+		fd = hold_lock_file_for_update(&write_lock,
+					       git_path_merge_rr(the_repository),
 					       LOCK_DIE_ON_ERROR);
 	read_rr(merge_rr);
 	return fd;
@@ -1251,6 +1252,6 @@ void rerere_clear(struct string_list *merge_rr)
 			rmdir(rerere_path(id, NULL));
 		}
 	}
-	unlink_or_warn(git_path_merge_rr());
+	unlink_or_warn(git_path_merge_rr(the_repository));
 	rollback_lock_file(&write_lock);
 }
diff --git a/sequencer.c b/sequencer.c
index fbbe5267f7..521da238b5 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -274,7 +274,7 @@ static void print_advice(int show_hint, struct replay_opts *opts)
 		 * (typically rebase --interactive) wants to take care
 		 * of the commit itself so remove CHERRY_PICK_HEAD
 		 */
-		unlink(git_path_cherry_pick_head());
+		unlink(git_path_cherry_pick_head(the_repository));
 		return;
 	}
 
@@ -951,7 +951,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
 		struct replay_opts *opts, int final_fixup)
 {
 	unsigned int flags = opts->edit ? EDIT_MSG : 0;
-	const char *msg_file = opts->edit ? NULL : git_path_merge_msg();
+	const char *msg_file = opts->edit ? NULL : git_path_merge_msg(the_repository);
 	struct object_id head;
 	struct commit *base, *next, *parent;
 	const char *base_label, *next_label;
@@ -1083,12 +1083,12 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
 			flags |= CLEANUP_MSG;
 			msg_file = rebase_path_fixup_msg();
 		} else {
-			const char *dest = git_path_squash_msg();
+			const char *dest = git_path_squash_msg(the_repository);
 			unlink(dest);
 			if (copy_file(dest, rebase_path_squash_msg(), 0666))
 				return error(_("could not rename '%s' to '%s'"),
 					     rebase_path_squash_msg(), dest);
-			unlink(git_path_merge_msg());
+			unlink(git_path_merge_msg(the_repository));
 			msg_file = dest;
 			flags |= EDIT_MSG;
 		}
@@ -1102,13 +1102,13 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
 		if (res < 0)
 			return res;
 		res |= write_message(msgbuf.buf, msgbuf.len,
-				     git_path_merge_msg(), 0);
+				     git_path_merge_msg(the_repository), 0);
 	} else {
 		struct commit_list *common = NULL;
 		struct commit_list *remotes = NULL;
 
 		res = write_message(msgbuf.buf, msgbuf.len,
-				    git_path_merge_msg(), 0);
+				    git_path_merge_msg(the_repository), 0);
 
 		commit_list_insert(base, &common);
 		commit_list_insert(next, &remotes);
@@ -1644,8 +1644,8 @@ static int rollback_single_pick(void)
 {
 	struct object_id head_oid;
 
-	if (!file_exists(git_path_cherry_pick_head()) &&
-	    !file_exists(git_path_revert_head()))
+	if (!file_exists(git_path_cherry_pick_head(the_repository)) &&
+	    !file_exists(git_path_revert_head(the_repository)))
 		return error(_("no cherry-pick or revert in progress"));
 	if (read_ref_full("HEAD", 0, &head_oid, NULL))
 		return error(_("cannot resolve HEAD"));
@@ -1870,10 +1870,11 @@ static int error_failed_squash(struct commit *commit,
 		return error(_("could not rename '%s' to '%s'"),
 			rebase_path_squash_msg(), rebase_path_message());
 	unlink(rebase_path_fixup_msg());
-	unlink(git_path_merge_msg());
-	if (copy_file(git_path_merge_msg(), rebase_path_message(), 0666))
+	unlink(git_path_merge_msg(the_repository));
+	if (copy_file(git_path_merge_msg(the_repository), rebase_path_message(), 0666))
 		return error(_("could not copy '%s' to '%s'"),
-			     rebase_path_message(), git_path_merge_msg());
+			     rebase_path_message(),
+			     git_path_merge_msg(the_repository));
 	return error_with_patch(commit, subject, subject_len, opts, 1, 0);
 }
 
@@ -2228,8 +2229,8 @@ static int continue_single_pick(void)
 {
 	const char *argv[] = { "commit", NULL };
 
-	if (!file_exists(git_path_cherry_pick_head()) &&
-	    !file_exists(git_path_revert_head()))
+	if (!file_exists(git_path_cherry_pick_head(the_repository)) &&
+	    !file_exists(git_path_revert_head(the_repository)))
 		return error(_("no cherry-pick or revert in progress"));
 	return run_command_v_opt(argv, RUN_GIT_CMD);
 }
@@ -2241,7 +2242,7 @@ static int commit_staged_changes(struct replay_opts *opts)
 	if (has_unstaged_changes(1))
 		return error(_("cannot rebase: You have unstaged changes."));
 	if (!has_uncommitted_changes(0)) {
-		const char *cherry_pick_head = git_path_cherry_pick_head();
+		const char *cherry_pick_head = git_path_cherry_pick_head(the_repository);
 
 		if (file_exists(cherry_pick_head) && unlink(cherry_pick_head))
 			return error(_("could not remove CHERRY_PICK_HEAD"));
@@ -2295,8 +2296,8 @@ int sequencer_continue(struct replay_opts *opts)
 
 	if (!is_rebase_i(opts)) {
 		/* Verify that the conflict has been resolved */
-		if (file_exists(git_path_cherry_pick_head()) ||
-		    file_exists(git_path_revert_head())) {
+		if (file_exists(git_path_cherry_pick_head(the_repository)) ||
+		    file_exists(git_path_revert_head(the_repository))) {
 			res = continue_single_pick();
 			if (res)
 				goto release_todo_list;
diff --git a/shallow.c b/shallow.c
index 18c6f063c1..2849046477 100644
--- a/shallow.c
+++ b/shallow.c
@@ -52,7 +52,7 @@ int is_repository_shallow_the_repository(void)
 		return is_shallow;
 
 	if (!path)
-		path = git_path_shallow();
+		path = git_path_shallow(the_repository);
 	/*
 	 * fetch-pack sets '--shallow-file ""' as an indicator that no
 	 * shallow file should be used. We could just open it and it
@@ -225,7 +225,7 @@ static void check_shallow_file_for_update_the_repository(void)
 	if (is_shallow == -1)
 		die("BUG: shallow must be initialized by now");
 
-	if (!stat_validity_check(&shallow_stat, git_path_shallow()))
+	if (!stat_validity_check(&shallow_stat, git_path_shallow(the_repository)))
 		die("shallow file has changed since we read it");
 }
 
@@ -320,7 +320,8 @@ void setup_alternate_shallow(struct lock_file *shallow_lock,
 	struct strbuf sb = STRBUF_INIT;
 	int fd;
 
-	fd = hold_lock_file_for_update(shallow_lock, git_path_shallow(),
+	fd = hold_lock_file_for_update(shallow_lock,
+				       git_path_shallow(the_repository),
 				       LOCK_DIE_ON_ERROR);
 	check_shallow_file_for_update(the_repository);
 	if (write_shallow_commits(&sb, 0, extra)) {
@@ -367,7 +368,8 @@ void prune_shallow(int show_only)
 		strbuf_release(&sb);
 		return;
 	}
-	fd = hold_lock_file_for_update(&shallow_lock, git_path_shallow(),
+	fd = hold_lock_file_for_update(&shallow_lock,
+				       git_path_shallow(the_repository),
 				       LOCK_DIE_ON_ERROR);
 	check_shallow_file_for_update(the_repository);
 	if (write_shallow_commits_1(&sb, 0, NULL, SEEN_ONLY)) {
@@ -376,7 +378,7 @@ void prune_shallow(int show_only)
 				  get_lock_file_path(&shallow_lock));
 		commit_lock_file(&shallow_lock);
 	} else {
-		unlink(git_path_shallow());
+		unlink(git_path_shallow(the_repository));
 		rollback_lock_file(&shallow_lock);
 	}
 	strbuf_release(&sb);
diff --git a/wt-status.c b/wt-status.c
index 6655bc6f67..6b2885a2f1 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1286,7 +1286,7 @@ static void show_rebase_in_progress(struct wt_status *s,
 			status_printf_ln(s, color,
 				_("  (use \"git rebase --abort\" to check out the original branch)"));
 		}
-	} else if (state->rebase_in_progress || !stat(git_path_merge_msg(), &st)) {
+	} else if (state->rebase_in_progress || !stat(git_path_merge_msg(the_repository), &st)) {
 		print_rebase_state(s, state, color);
 		if (s->hints)
 			status_printf_ln(s, color,
@@ -1521,17 +1521,17 @@ void wt_status_get_state(struct wt_status_state *state,
 	struct stat st;
 	struct object_id oid;
 
-	if (!stat(git_path_merge_head(), &st)) {
+	if (!stat(git_path_merge_head(the_repository), &st)) {
 		state->merge_in_progress = 1;
 	} else if (wt_status_check_rebase(NULL, state)) {
 		;		/* all set */
-	} else if (!stat(git_path_cherry_pick_head(), &st) &&
+	} else if (!stat(git_path_cherry_pick_head(the_repository), &st) &&
 			!get_oid("CHERRY_PICK_HEAD", &oid)) {
 		state->cherry_pick_in_progress = 1;
 		hashcpy(state->cherry_pick_head_sha1, oid.hash);
 	}
 	wt_status_check_bisect(NULL, state);
-	if (!stat(git_path_revert_head(), &st) &&
+	if (!stat(git_path_revert_head(the_repository), &st) &&
 	    !get_oid("REVERT_HEAD", &oid)) {
 		state->revert_in_progress = 1;
 		hashcpy(state->revert_head_sha1, oid.hash);
-- 
2.15.1.433.g936d1b9894.dirty
Previous: Stefan BellerNext: Stefan Beller
Message 191 of 239 in “Moving global state into the repository object”
  1. 000/194 Moving global state into the repository objectStefan Beller, Feb 5, 2018
  2. 001/194 repository: introduce object store fieldStefan Beller, Feb 5, 2018
  3. 002/194 object-store: move alt_odb_list and alt_odb_tail to object storeStefan Beller, Feb 5, 2018
  4. 003/194 object-store: move packed_git and packed_git_mru to object storeStefan Beller, Feb 5, 2018
  5. Junio C HamanoFeb 9, 2018
  6. Stefan BellerFeb 12, 2018
  7. Junio C HamanoFeb 12, 2018
  8. René ScharfeFeb 12, 2018
  9. Junio C HamanoFeb 12, 2018
  10. René ScharfeFeb 13, 2018
  11. Stefan BellerFeb 13, 2018
  12. Junio C HamanoFeb 14, 2018
  13. René ScharfeFeb 12, 2018
  14. 005/194 pack: move approximate object count to object storeStefan Beller, Feb 5, 2018
  15. 004/194 pack: move prepare_packed_git_run_once to object storeStefan Beller, Feb 5, 2018
  16. 006/194 sha1_file: add repository argument to alt_odb_usableStefan Beller, Feb 5, 2018
  17. 007/194 sha1_file: add repository argument to link_alt_odb_entryStefan Beller, Feb 5, 2018
  18. 008/194 sha1_file: add repository argument to read_info_alternatesStefan Beller, Feb 5, 2018
  19. 009/194 sha1_file: add repository argument to link_alt_odb_entriesStefan Beller, Feb 5, 2018
  20. 010/194 sha1_file: add repository argument to stat_sha1_fileStefan Beller, Feb 5, 2018
  21. 012/194 sha1_file: add repository argument to map_sha1_file_1Stefan Beller, Feb 5, 2018
  22. 013/194 sha1_file: add repository argument to sha1_loose_object_infoStefan Beller, Feb 5, 2018
  23. 011/194 sha1_file: add repository argument to open_sha1_fileStefan Beller, Feb 5, 2018
  24. 014/194 object-store: add repository argument to prepare_alt_odbStefan Beller, Feb 5, 2018
  25. 015/194 object-store: add repository argument to foreach_alt_odbStefan Beller, Feb 5, 2018
  26. 016/194 pack: add repository argument to install_packed_gitStefan Beller, Feb 5, 2018
  27. 018/194 pack: add repository argument to rearrange_packed_gitStefan Beller, Feb 5, 2018
  28. 017/194 pack: add repository argument to prepare_packed_git_oneStefan Beller, Feb 5, 2018
  29. 019/194 pack: add repository argument to prepare_packed_git_mruStefan Beller, Feb 5, 2018
  30. 020/194 pack: add repository argument to prepare_packed_gitStefan Beller, Feb 5, 2018
  31. 021/194 pack: add repository argument to reprepare_packed_gitStefan Beller, Feb 5, 2018
  32. 021/194 pack: add repository argument to reprepare_packed_gitStefan Beller, Feb 5, 2018
  33. 022/194 pack: add repository argument to sha1_file_nameStefan Beller, Feb 5, 2018
  34. 024/194 sha1_file: allow alt_odb_usable to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  35. 025/194 object-store: allow prepare_alt_odb to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  36. brian m. carlsonFeb 6, 2018
  37. Derrick StoleeFeb 6, 2018
  38. Stefan BellerFeb 6, 2018
  39. brian m. carlsonFeb 8, 2018
  40. Jonathan TanFeb 7, 2018
  41. 026/194 object-store: allow foreach_alt_odb to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  42. 028/194 pack: allow rearrange_packed_git to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  43. 023/194 pack: add repository argument to map_sha1_fileStefan Beller, Feb 5, 2018
  44. 027/194 pack: allow install_packed_git to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  45. 029/194 pack: allow prepare_packed_git_mru to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  46. 030/194 pack: allow prepare_packed_git_one to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  47. 031/194 pack: allow prepare_packed_git to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  48. 032/194 pack: allow reprepare_packed_git to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  49. 033/194 pack: allow sha1_file_name to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  50. 034/194 pack: allow stat_sha1_file to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  51. 035/194 pack: allow open_sha1_file to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  52. 036/194 pack: allow map_sha1_file_1 to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  53. 037/194 pack: allow map_sha1_file to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  54. 038/194 pack: allow sha1_loose_object_info to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  55. Jonathan TanFeb 7, 2018
  56. Stefan BellerFeb 7, 2018
  57. 039/194 replace_object.c: rename to use dash in file nameStefan Beller, Feb 5, 2018
  58. 040/194 replace-object: move replace_object to object storeStefan Beller, Feb 5, 2018
  59. 041/194 sha1_file: add repository argument to sha1_object_info_extendedStefan Beller, Feb 5, 2018
  60. 042/194 object-store: move alternates API to new alternates.hStefan Beller, Feb 5, 2018
  61. brian m. carlsonFeb 6, 2018
  62. Stefan BellerFeb 6, 2018
  63. Junio C HamanoFeb 9, 2018
  64. Eric SunshineFeb 6, 2018
  65. Stefan BellerFeb 6, 2018
  66. 043/194 object-store: move loose object functions to new loose-object.hStefan Beller, Feb 5, 2018
  67. 044/194 pack: move struct pack_window and pack_entry to packfile.hStefan Beller, Feb 5, 2018
  68. 045/194 object-store: move object access functions to object-store.hStefan Beller, Feb 5, 2018
  69. 047/194 object-store: move lookup_replace_object to replace-object.hStefan Beller, Feb 5, 2018
  70. 046/194 object-store: move replace_objects back to object-storeStefan Beller, Feb 5, 2018
  71. Junio C HamanoFeb 9, 2018
  72. Stefan BellerFeb 12, 2018
  73. 048/194 replace-object: add repository argument to do_lookup_replace_objectStefan Beller, Feb 5, 2018
  74. 049/194 replace-object: move replace objects prepared flag to object storeStefan Beller, Feb 5, 2018
  75. 050/194 replace-object: check_replace_refs is safe in multi repo environmentStefan Beller, Feb 5, 2018
  76. Eric SunshineFeb 6, 2018
  77. 051/194 refs: add repository argument to for_each_replace_refStefan Beller, Feb 5, 2018
  78. 052/194 refs: add repository argument to get_main_ref_storeStefan Beller, Feb 5, 2018
  79. 053/194 replace-object: add repository argument to register_replace_objectStefan Beller, Feb 5, 2018
  80. 054/194 replace-object: add repository argument to register_replace_refStefan Beller, Feb 5, 2018
  81. 055/194 replace-object: add repository argument to replace_object_posStefan Beller, Feb 5, 2018
  82. 056/194 replace-object: allow replace_object_pos to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  83. 057/194 replace-object: allow register_replace_object to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  84. 058/194 replace-object: add repository argument to prepare_replace_objectStefan Beller, Feb 5, 2018
  85. 059/194 refs: store the main ref store inside the repository structStefan Beller, Feb 5, 2018
  86. Eric SunshineFeb 6, 2018
  87. Stefan BellerFeb 6, 2018
  88. 060/194 refs: allow for_each_replace_ref to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  89. 061/194 replace-object: allow prepare_replace_object to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  90. 063/194 replace-object: add repository argument to lookup_replace_objectStefan Beller, Feb 5, 2018
  91. 062/194 replace_object: allow do_lookup_replace_object to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  92. 064/194 repository: allow lookup_replace_object to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  93. 065/194 object-store: add repository argument to sha1_object_infoStefan Beller, Feb 5, 2018
  94. brian m. carlsonFeb 6, 2018
  95. 066/194 pack: add repository argument to retry_bad_packed_offsetStefan Beller, Feb 5, 2018
  96. 067/194 pack: add repository argument to packed_to_object_typeStefan Beller, Feb 5, 2018
  97. 068/194 pack: add repository argument to packed_object_infoStefan Beller, Feb 5, 2018
  98. 069/194 pack: add repository argument to find_pack_entryStefan Beller, Feb 5, 2018
  99. 070/194 packfile: add repository argument to read_objectStefan Beller, Feb 5, 2018
  100. 071/194 packfile: add repository argument to unpack_entryStefan Beller, Feb 5, 2018
  101. 072/194 packfile: add repository argument to cache_or_unpack_entryStefan Beller, Feb 5, 2018
  102. 073/194 pack: allow find_pack_entry to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  103. 074/194 object-store: allow sha1_object_info to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  104. 075/194 fetch, push: do not use submodule as alternate in has_commits checkStefan Beller, Feb 5, 2018
  105. Eric SunshineFeb 6, 2018
  106. Stefan BellerFeb 6, 2018
  107. 076/194 push: add test showing bad interaction of replace refs and submodulesStefan Beller, Feb 5, 2018
  108. brian m. carlsonFeb 6, 2018
  109. Stefan BellerFeb 6, 2018
  110. 077/194 replace_object: allow register_replace_ref to handle arbitrary repositoriesStefan Beller, Feb 5, 2018
  111. 078/194 cache.h: migrate the definition of object_id to object.hStefan Beller, Feb 5, 2018
  112. 079/194 repository: introduce object parser fieldStefan Beller, Feb 5, 2018
  113. 080/194 object: add repository argument to parse_objectStefan Beller, Feb 5, 2018
  114. 081/194 object: add repository argument to create_objectStefan Beller, Feb 5, 2018
  115. 082/194 object: add repository argument to lookup_objectStefan Beller, Feb 5, 2018
  116. 083/194 object: add repository argument to grow_object_hashStefan Beller, Feb 5, 2018
  117. 084/194 blob: add repository argument to lookup_blobStefan Beller, Feb 5, 2018
  118. 085/194 tree: add repository argument to lookup_treeStefan Beller, Feb 5, 2018
  119. 086/194 tag: add repository argument to lookup_tagStefan Beller, Feb 5, 2018
  120. 087/194 tag: add repository argument to parse_tag_bufferStefan Beller, Feb 5, 2018
  121. 088/194 tag: add repository argument to deref_tagStefan Beller, Feb 5, 2018
  122. 089/194 object: add repository argument to lookup_commit_reference_gentlyStefan Beller, Feb 5, 2018
  123. 090/194 object: add repository argument to lookup_commit_referenceStefan Beller, Feb 5, 2018
  124. 091/194 object: add repository argument to lookup_commitStefan Beller, Feb 5, 2018
  125. 092/194 object: move grafts to object parserStefan Beller, Feb 5, 2018
  126. Eric SunshineFeb 6, 2018
  127. Stefan BellerFeb 6, 2018
  128. 093/194 object: add repository argument to commit_graft_posStefan Beller, Feb 5, 2018
  129. 094/194 commit: add repository argument to parse_commit_bufferStefan Beller, Feb 5, 2018
  130. 095/194 object: add repository argument to register_commit_graftStefan Beller, Feb 5, 2018
  131. 096/194 object: add repository argument to read_graft_fileStefan Beller, Feb 5, 2018
  132. 097/194 object: add repository argument to prepare_commit_graftStefan Beller, Feb 5, 2018
  133. 098/194 object: add repository argument to lookup_commit_graftStefan Beller, Feb 5, 2018
  134. 099/194 object: allow grow_object_hash to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  135. 100/194 object: allow create_object to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  136. 101/194 object: allow lookup_object to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  137. 102/194 object: add repository argument to lookup_unknown_objectStefan Beller, Feb 6, 2018
  138. 103/194 object: allow lookup_unknown_object to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  139. 104/194 object: add repository argument to parse_object_bufferStefan Beller, Feb 6, 2018
  140. 105/194 repository: keep track of all open repositoriesStefan Beller, Feb 6, 2018
  141. 106/194 Rename sha1_object_info.cocci to object_store.cocciStefan Beller, Feb 6, 2018
  142. 107/194 alternates: add repository argument to add_to_alternates_fileStefan Beller, Feb 6, 2018
  143. 108/194 alternates: add repository argument to add_to_alternates_memoryStefan Beller, Feb 6, 2018
  144. 109/194 object-store: move check_sha1_signature to object-store.hStefan Beller, Feb 6, 2018
  145. 110/194 object-store: add repository argument to check_sha1_signatureStefan Beller, Feb 6, 2018
  146. 111/194 object-store: add repository argument to read_objectStefan Beller, Feb 6, 2018
  147. 112/194 object-store: add repository argument to read_sha1_file_extendedStefan Beller, Feb 6, 2018
  148. 113/194 object-store: add repository argument to read_sha1_fileStefan Beller, Feb 6, 2018
  149. 114/194 object: move read_object_with_reference to object.hStefan Beller, Feb 6, 2018
  150. 115/194 packfile: add repository argument to has_packed_and_badStefan Beller, Feb 6, 2018
  151. 116/194 packfile: allow has_packed_and_bad to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  152. 117/194 streaming: add repository argument to open_istream_fnStefan Beller, Feb 6, 2018
  153. 119/194 streaming: add repository argument to istream_sourceStefan Beller, Feb 6, 2018
  154. 120/194 streaming: allow istream_source to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  155. 121/194 sha1_file: allow read_object to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  156. 122/194 object-store.h: allow read_sha1_file{_extended} to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  157. 123/194 streaming: allow open_istream_incore to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  158. 124/194 streaming: allow open_istream_pack_non_delta to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  159. 125/194 streaming: allow open_istream_loose to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  160. 126/194 streaming: allow open_istream to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  161. 127/194 alternates: convert add_to_alternates_memory to handle arbitrary reposStefan Beller, Feb 6, 2018
  162. 128/194 object: add repository argument to object_as_typeStefan Beller, Feb 6, 2018
  163. 129/194 alloc: add repository argument to alloc_blob_nodeStefan Beller, Feb 6, 2018
  164. 130/194 alloc: add repository argument to alloc_tree_nodeStefan Beller, Feb 6, 2018
  165. 131/194 alloc: add repository argument to alloc_commit_nodeStefan Beller, Feb 6, 2018
  166. 132/194 alloc: add repository argument to alloc_tag_nodeStefan Beller, Feb 6, 2018
  167. 133/194 alloc: add repository argument to alloc_object_nodeStefan Beller, Feb 6, 2018
  168. 134/194 alloc: add repository argument to alloc_reportStefan Beller, Feb 6, 2018
  169. 135/194 alloc: add repository argument to alloc_commit_indexStefan Beller, Feb 6, 2018
  170. 136/194 alloc: allow arbitrary repositories for alloc functionsStefan Beller, Feb 6, 2018
  171. Eric SunshineFeb 6, 2018
  172. 137/194 object: allow object_as_type to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  173. 138/194 commit: allow lookup_commit to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  174. 139/194 sha1_file: allow add_to_alternates_file to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  175. 140/194 commit: convert commit_graft_pos() to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  176. 142/194 commit: convert read_graft_file to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  177. 141/194 commit: convert register_commit_graft to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  178. 143/194 object: add repository argument to parse_commit_gentlyStefan Beller, Feb 6, 2018
  179. 144/194 commit: add repository argument to parse_commitStefan Beller, Feb 6, 2018
  180. 145/194 commit: add repository argument to set_commit_bufferStefan Beller, Feb 6, 2018
  181. 146/194 commit: add repository argument to get_cached_commit_bufferStefan Beller, Feb 6, 2018
  182. 147/194 commit: add repository argument to unuse_commit_bufferStefan Beller, Feb 6, 2018
  183. 148/194 commit: add repository argument to free_commit_bufferStefan Beller, Feb 6, 2018
  184. 149/194 commit: allow commit buffer functions to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  185. 150/194 tree: allow lookup_tree to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  186. 151/194 cache: convert get_graft_file to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  187. 152/194 shallow: add repository argument to set_alternate_shallow_fileStefan Beller, Feb 6, 2018
  188. 153/194 shallow: add repository argument to register_shallowStefan Beller, Feb 6, 2018
  189. 154/194 shallow: add repository argument to check_shallow_file_for_updateStefan Beller, Feb 6, 2018
  190. 155/194 shallow: add repository argument to is_repository_shallowStefan Beller, Feb 6, 2018
  191. 156/194 migrate cached path to use the_repositoryStefan Beller, Feb 6, 2018
  192. 157/194 shallow: migrate shallow information into the object parserStefan Beller, Feb 6, 2018
  193. 158/194 commit: allow prepare_commit_graft to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  194. 159/194 commit: allow lookup_commit_graft to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  195. 160/194 commit: allow arbitrary repository argument for parse_commit_bufferStefan Beller, Feb 6, 2018
  196. 161/194 commit: allow parse_commit_gently to handle arbitrary repositoryStefan Beller, Feb 6, 2018
  197. 162/194 commit: add repository argument to get_merge_bases_many_0Stefan Beller, Feb 6, 2018
  198. 163/194 commit: add repository argument to merge_bases_manyStefan Beller, Feb 6, 2018
  199. 164/194 commit: add repository argument to paint_down_to_commonStefan Beller, Feb 6, 2018
  200. 165/194 commit: allow parse_commit to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  201. 166/194 commit: allow paint_down_to_common to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  202. 167/194 commit: allow merge_bases_many to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  203. 168/194 commit: add repository argument to remove_redundantStefan Beller, Feb 6, 2018
  204. 169/194 commit: allow remove_redundant to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  205. 170/194 commit: allow get_merge_bases_many_0 to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  206. 171/194 commit: add repository argument to get_merge_basesStefan Beller, Feb 6, 2018
  207. 172/194 commit: allow get_merge_bases to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  208. 173/194 blob: allow lookup_blob to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  209. 174/194 tag: allow lookup_tag to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  210. 176/194 object: allow parse_object_buffer to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  211. 175/194 tag: allow parse_tag_buffer to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  212. 177/194 objects: allow check_sha1_signature to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  213. 178/194 object: allow parse_object to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  214. 179/194 tag: allow deref_tag to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  215. 180/194 commit: allow lookup_commit_reference_gently to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  216. 181/194 commit: allow lookup_commit_reference to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  217. 182/194 commit: add repository argument to get_commit_bufferStefan Beller, Feb 6, 2018
  218. 183/194 commit: add repository argument to logmsg_reencodeStefan Beller, Feb 6, 2018
  219. 184/194 pretty: add repository argument to format_commit_messageStefan Beller, Feb 6, 2018
  220. 185/194 commit: allow get_commit_buffer to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  221. 186/194 pretty: allow logmsg_reencode to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  222. 187/194 commit: add repository argument to in_merge_bases_manyStefan Beller, Feb 6, 2018
  223. 188/194 commit: add repository argument to in_merge_basesStefan Beller, Feb 6, 2018
  224. 189/194 commit: allow in_merge_bases_many to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  225. 190/194 commit: allow in_merge_bases to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  226. 191/194 pretty: allow format_commit_message to handle arbitrary repositoriesStefan Beller, Feb 6, 2018
  227. 192/194 submodule: add repository argument to print_submodule_summaryStefan Beller, Feb 6, 2018
  228. 193/194 submodule: Reorder open_submodule functionStefan Beller, Feb 6, 2018
  229. 194/194 submodule: use submodule repos for object lookupStefan Beller, Feb 6, 2018
  230. Stefan BellerFeb 6, 2018
  231. brian m. carlsonFeb 6, 2018
  232. Stefan BellerFeb 6, 2018
  233. Stefan BellerFeb 6, 2018
  234. Eric SunshineFeb 7, 2018
  235. Duy NguyenFeb 7, 2018
  236. Stefan BellerFeb 7, 2018
  237. Duy NguyenFeb 10, 2018
  238. Jeff HostetlerFeb 7, 2018
  239. Elijah NewrenFeb 8, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.