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

[PATCH v3 15/33] sha1-name.c: store and use repo in struct disambiguate_state

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Apr 6, 2019, 11:34 UTC
Message-ID
<20190406113453.5149-16-pclouds@gmail.com>
In-Reply-To
<20190406113453.5149-1-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 sha1-name.c | 95 +++++++++++++++++++++++++++++++++--------------------
 1 file changed, 59 insertions(+), 36 deletions(-)
diff --git a/sha1-name.c b/sha1-name.c
index 9b57787b76..a75992eb54 100644
--- a/sha1-name.c
+++ b/sha1-name.c
@@ -17,13 +17,14 @@
 
 static int get_oid_oneline(const char *, struct object_id *, struct commit_list *);
 
-typedef int (*disambiguate_hint_fn)(const struct object_id *, void *);
+typedef int (*disambiguate_hint_fn)(struct repository *, const struct object_id *, void *);
 
 struct disambiguate_state {
 	int len; /* length of prefix in hex chars */
 	char hex_pfx[GIT_MAX_HEXSZ + 1];
 	struct object_id bin_pfx;
 
+	struct repository *repo;
 	disambiguate_hint_fn fn;
 	void *cb_data;
 	struct object_id candidate;
@@ -38,7 +39,7 @@ struct disambiguate_state {
 static void update_candidates(struct disambiguate_state *ds, const struct object_id *current)
 {
 	if (ds->always_call_fn) {
-		ds->ambiguous = ds->fn(current, ds->cb_data) ? 1 : 0;
+		ds->ambiguous = ds->fn(ds->repo, current, ds->cb_data) ? 1 : 0;
 		return;
 	}
 	if (!ds->candidate_exists) {
@@ -58,7 +59,7 @@ static void update_candidates(struct disambiguate_state *ds, const struct object
 	}
 
 	if (!ds->candidate_checked) {
-		ds->candidate_ok = ds->fn(&ds->candidate, ds->cb_data);
+		ds->candidate_ok = ds->fn(ds->repo, &ds->candidate, ds->cb_data);
 		ds->disambiguate_fn_used = 1;
 		ds->candidate_checked = 1;
 	}
@@ -71,7 +72,7 @@ static void update_candidates(struct disambiguate_state *ds, const struct object
 	}
 
 	/* if we reach this point, we know ds->candidate satisfies fn */
-	if (ds->fn(current, ds->cb_data)) {
+	if (ds->fn(ds->repo, current, ds->cb_data)) {
 		/*
 		 * if both current and candidate satisfy fn, we cannot
 		 * disambiguate.
@@ -89,9 +90,7 @@ static void find_short_object_filename(struct disambiguate_state *ds)
 {
 	struct object_directory *odb;
 
-	for (odb = the_repository->objects->odb;
-	     odb && !ds->ambiguous;
-	     odb = odb->next) {
+	for (odb = ds->repo->objects->odb; odb && !ds->ambiguous; odb = odb->next) {
 		int pos;
 		struct oid_array *loose_objects;
 
@@ -182,10 +181,10 @@ static void find_short_packed_object(struct disambiguate_state *ds)
 	struct multi_pack_index *m;
 	struct packed_git *p;
 
-	for (m = get_multi_pack_index(the_repository); m && !ds->ambiguous;
+	for (m = get_multi_pack_index(ds->repo); m && !ds->ambiguous;
 	     m = m->next)
 		unique_in_midx(m, ds);
-	for (p = get_packed_git(the_repository); p && !ds->ambiguous;
+	for (p = get_packed_git(ds->repo); p && !ds->ambiguous;
 	     p = p->next)
 		unique_in_pack(p, ds);
 }
@@ -215,7 +214,7 @@ static int finish_object_disambiguation(struct disambiguate_state *ds,
 		 * same repository!
 		 */
 		ds->candidate_ok = (!ds->disambiguate_fn_used ||
-				    ds->fn(&ds->candidate, ds->cb_data));
+				    ds->fn(ds->repo, &ds->candidate, ds->cb_data));
 
 	if (!ds->candidate_ok)
 		return SHORT_NAME_AMBIGUOUS;
@@ -224,59 +223,67 @@ static int finish_object_disambiguation(struct disambiguate_state *ds,
 	return 0;
 }
 
-static int disambiguate_commit_only(const struct object_id *oid, void *cb_data_unused)
+static int disambiguate_commit_only(struct repository *r,
+				    const struct object_id *oid,
+				    void *cb_data_unused)
 {
-	int kind = oid_object_info(the_repository, oid, NULL);
+	int kind = oid_object_info(r, oid, NULL);
 	return kind == OBJ_COMMIT;
 }
 
-static int disambiguate_committish_only(const struct object_id *oid, void *cb_data_unused)
+static int disambiguate_committish_only(struct repository *r,
+					const struct object_id *oid,
+					void *cb_data_unused)
 {
 	struct object *obj;
 	int kind;
 
-	kind = oid_object_info(the_repository, oid, NULL);
+	kind = oid_object_info(r, oid, NULL);
 	if (kind == OBJ_COMMIT)
 		return 1;
 	if (kind != OBJ_TAG)
 		return 0;
 
 	/* We need to do this the hard way... */
-	obj = deref_tag(the_repository, parse_object(the_repository, oid),
-			NULL, 0);
+	obj = deref_tag(r, parse_object(r, oid), NULL, 0);
 	if (obj && obj->type == OBJ_COMMIT)
 		return 1;
 	return 0;
 }
 
-static int disambiguate_tree_only(const struct object_id *oid, void *cb_data_unused)
+static int disambiguate_tree_only(struct repository *r,
+				  const struct object_id *oid,
+				  void *cb_data_unused)
 {
-	int kind = oid_object_info(the_repository, oid, NULL);
+	int kind = oid_object_info(r, oid, NULL);
 	return kind == OBJ_TREE;
 }
 
-static int disambiguate_treeish_only(const struct object_id *oid, void *cb_data_unused)
+static int disambiguate_treeish_only(struct repository *r,
+				     const struct object_id *oid,
+				     void *cb_data_unused)
 {
 	struct object *obj;
 	int kind;
 
-	kind = oid_object_info(the_repository, oid, NULL);
+	kind = oid_object_info(r, oid, NULL);
 	if (kind == OBJ_TREE || kind == OBJ_COMMIT)
 		return 1;
 	if (kind != OBJ_TAG)
 		return 0;
 
 	/* We need to do this the hard way... */
-	obj = deref_tag(the_repository, parse_object(the_repository, oid),
-			NULL, 0);
+	obj = deref_tag(r, parse_object(r, oid), NULL, 0);
 	if (obj && (obj->type == OBJ_TREE || obj->type == OBJ_COMMIT))
 		return 1;
 	return 0;
 }
 
-static int disambiguate_blob_only(const struct object_id *oid, void *cb_data_unused)
+static int disambiguate_blob_only(struct repository *r,
+				  const struct object_id *oid,
+				  void *cb_data_unused)
 {
-	int kind = oid_object_info(the_repository, oid, NULL);
+	int kind = oid_object_info(r, oid, NULL);
 	return kind == OBJ_BLOB;
 }
 
@@ -310,7 +317,8 @@ int set_disambiguate_hint_config(const char *var, const char *value)
 	return error("unknown hint type for '%s': %s", var, value);
 }
 
-static int init_object_disambiguation(const char *name, int len,
+static int init_object_disambiguation(struct repository *r,
+				      const char *name, int len,
 				      struct disambiguate_state *ds)
 {
 	int i;
@@ -341,7 +349,8 @@ static int init_object_disambiguation(const char *name, int len,
 
 	ds->len = len;
 	ds->hex_pfx[len] = '\0';
-	prepare_alt_odb(the_repository);
+	ds->repo = r;
+	prepare_alt_odb(r);
 	return 0;
 }
 
@@ -351,25 +360,25 @@ static int show_ambiguous_object(const struct object_id *oid, void *data)
 	struct strbuf desc = STRBUF_INIT;
 	int type;
 
-	if (ds->fn && !ds->fn(oid, ds->cb_data))
+	if (ds->fn && !ds->fn(ds->repo, oid, ds->cb_data))
 		return 0;
 
-	type = oid_object_info(the_repository, oid, NULL);
+	type = oid_object_info(ds->repo, oid, NULL);
 	if (type == OBJ_COMMIT) {
-		struct commit *commit = lookup_commit(the_repository, oid);
+		struct commit *commit = lookup_commit(ds->repo, oid);
 		if (commit) {
 			struct pretty_print_context pp = {0};
 			pp.date_mode.type = DATE_SHORT;
 			format_commit_message(commit, " %ad - %s", &desc, &pp);
 		}
 	} else if (type == OBJ_TAG) {
-		struct tag *tag = lookup_tag(the_repository, oid);
+		struct tag *tag = lookup_tag(ds->repo, oid);
 		if (!parse_tag(tag) && tag->tag)
 			strbuf_addf(&desc, " %s", tag->tag);
 	}
 
 	advise("  %s %s%s",
-	       find_unique_abbrev(oid, DEFAULT_ABBREV),
+	       repo_find_unique_abbrev(ds->repo, oid, DEFAULT_ABBREV),
 	       type_name(type) ? type_name(type) : "unknown type",
 	       desc.buf);
 
@@ -383,6 +392,13 @@ static int collect_ambiguous(const struct object_id *oid, void *data)
 	return 0;
 }
 
+static int repo_collect_ambiguous(struct repository *r,
+				  const struct object_id *oid,
+				  void *data)
+{
+	return collect_ambiguous(oid, data);
+}
+
 static struct repository *sort_ambiguous_repo;
 static int sort_ambiguous(const void *a, const void *b)
 {
@@ -428,7 +444,7 @@ static enum get_oid_result get_short_oid(const char *name, int len,
 	struct disambiguate_state ds;
 	int quietly = !!(flags & GET_OID_QUIETLY);
 
-	if (init_object_disambiguation(name, len, &ds) < 0)
+	if (init_object_disambiguation(the_repository, name, len, &ds) < 0)
 		return -1;
 
 	if (HAS_MULTI_BITS(flags & GET_OID_DISAMBIGUATORS))
@@ -483,11 +499,11 @@ int for_each_abbrev(const char *prefix, each_abbrev_fn fn, void *cb_data)
 	struct disambiguate_state ds;
 	int ret;
 
-	if (init_object_disambiguation(prefix, strlen(prefix), &ds) < 0)
+	if (init_object_disambiguation(the_repository, prefix, strlen(prefix), &ds) < 0)
 		return -1;
 
 	ds.always_call_fn = 1;
-	ds.fn = collect_ambiguous;
+	ds.fn = repo_collect_ambiguous;
 	ds.cb_data = &collect;
 	find_short_object_filename(&ds);
 	find_short_packed_object(&ds);
@@ -543,6 +559,13 @@ static int extend_abbrev_len(const struct object_id *oid, void *cb_data)
 	return 0;
 }
 
+static int repo_extend_abbrev_len(struct repository *r,
+				  const struct object_id *oid,
+				  void *cb_data)
+{
+	return extend_abbrev_len(oid, cb_data);
+}
+
 static void find_abbrev_len_for_midx(struct multi_pack_index *m,
 				     struct min_abbrev_data *mad)
 {
@@ -668,10 +691,10 @@ int repo_find_unique_abbrev_r(struct repository *r, char *hex,
 
 	find_abbrev_len_packed(&mad);
 
-	if (init_object_disambiguation(hex, mad.cur_len, &ds) < 0)
+	if (init_object_disambiguation(r, hex, mad.cur_len, &ds) < 0)
 		return -1;
 
-	ds.fn = extend_abbrev_len;
+	ds.fn = repo_extend_abbrev_len;
 	ds.always_call_fn = 1;
 	ds.cb_data = (void *)&mad;
 
-- 
2.21.0.479.g47ac719cd3
Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 88 of 153 in “Kill the_repository in sha1-name.c”
  1. 00/31 Kill the_repository in sha1-name.cNguyễn Thái Ngọc Duy, Mar 30, 2019
  2. 01/31 packfile.c: add repo_approximate_object_count()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  3. 02/31 refs.c: add refs_ref_exists()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  4. 03/31 refs.c: add refs_shorten_unambiguous_ref()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  5. 04/31 refs.c: remove the_repo from substitute_branch_name()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  6. 05/31 refs.c: remove the_repo from expand_ref()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  7. 06/31 refs.c: add repo_dwim_ref()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  8. 07/31 refs.c: add repo_dwim_log()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  9. 08/31 refs.c: remove the_repo from read_ref_at()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  10. 09/31 commit.c: add repo_get_commit_tree()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  11. SZEDER GáborApr 2, 2019
  12. 10/31 sha1-name.c: remove the_repo from sort_ambiguous()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  13. 11/31 sha1-name.c: remove the_repo from find_abbrev_len_packed()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  14. 12/31 sha1-name.c: add repo_find_unique_abbrev_r()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  15. 13/31 sha1-name.c: store and use repo in struct disambiguate_stateNguyễn Thái Ngọc Duy, Mar 30, 2019
  16. 14/31 sha1-name.c: add repo_for_each_abbrev()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  17. 15/31 sha1-name.c: remove the_repo from get_short_oid()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  18. 16/31 sha1-name.c: remove the_repo from interpret_nth_prior_checkout()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  19. 17/31 sha1-name.c: remove the_repo from interpret_branch_mark()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  20. 18/31 sha1-name.c: add repo_interpret_branch_name()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  21. 19/31 sha1-name.c: remove the_repo from get_oid_oneline()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  22. 20/31 sha1-name.c: remove the_repo from get_describe_name()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  23. 21/31 sha1-name.c: remove the_repo from get_oid_basic()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  24. 22/31 sha1-name.c: remove the_repo from get_oid_1()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  25. 23/31 sha1-name.c: remove the_repo from handle_one_ref()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  26. 24/31 sha1-name.c: remove the_repo from diagnose_invalid_index_path()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  27. 25/31 sha1-name.c: remove the_repo from resolve_relative_path()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  28. 26/31 sha1-name.c: remove the_repo from get_oid_with_context_1()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  29. 27/31 sha1-name.c: add repo_get_oid()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  30. 28/31 submodule-config.c: use repo_get_oid for reading .gitmodulesNguyễn Thái Ngọc Duy, Mar 30, 2019
  31. 29/31 sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_nameNguyễn Thái Ngọc Duy, Mar 30, 2019
  32. 30/31 sha1-name.c: remove the_repo from other get_oid_*Nguyễn Thái Ngọc Duy, Mar 30, 2019
  33. 31/31 sha1-name.c: remove the_repo from get_oid_mb()Nguyễn Thái Ngọc Duy, Mar 30, 2019
  34. 00/32 nd/sha1-name-c-wo-the-repository updatesNguyễn Thái Ngọc Duy, Apr 3, 2019
  35. 01/32 rebase: 'make coccicheck' cleanupNguyễn Thái Ngọc Duy, Apr 3, 2019
  36. SZEDER GáborApr 4, 2019
  37. Duy NguyenApr 5, 2019
  38. SZEDER GáborApr 9, 2019
  39. 02/32 packfile.c: add repo_approximate_object_count()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  40. 03/32 refs.c: add refs_ref_exists()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  41. 04/32 refs.c: add refs_shorten_unambiguous_ref()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  42. 05/32 refs.c: remove the_repo from substitute_branch_name()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  43. 06/32 refs.c: remove the_repo from expand_ref()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  44. 07/32 refs.c: add repo_dwim_ref()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  45. 08/32 refs.c: add repo_dwim_log()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  46. 09/32 refs.c: remove the_repo from read_ref_at()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  47. 10/32 commit.c: add repo_get_commit_tree()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  48. SZEDER GáborApr 4, 2019
  49. Duy NguyenApr 5, 2019
  50. Johannes SchindelinApr 5, 2019
  51. 11/32 sha1-name.c: remove the_repo from sort_ambiguous()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  52. 12/32 sha1-name.c: remove the_repo from find_abbrev_len_packed()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  53. 13/32 sha1-name.c: add repo_find_unique_abbrev_r()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  54. 14/32 sha1-name.c: store and use repo in struct disambiguate_stateNguyễn Thái Ngọc Duy, Apr 3, 2019
  55. 15/32 sha1-name.c: add repo_for_each_abbrev()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  56. 16/32 sha1-name.c: remove the_repo from get_short_oid()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  57. 17/32 sha1-name.c: remove the_repo from interpret_nth_prior_checkout()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  58. 18/32 sha1-name.c: remove the_repo from interpret_branch_mark()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  59. 19/32 sha1-name.c: add repo_interpret_branch_name()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  60. 20/32 sha1-name.c: remove the_repo from get_oid_oneline()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  61. 21/32 sha1-name.c: remove the_repo from get_describe_name()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  62. 22/32 sha1-name.c: remove the_repo from get_oid_basic()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  63. 23/32 sha1-name.c: remove the_repo from get_oid_1()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  64. 24/32 sha1-name.c: remove the_repo from handle_one_ref()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  65. 25/32 sha1-name.c: remove the_repo from diagnose_invalid_index_path()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  66. 26/32 sha1-name.c: remove the_repo from resolve_relative_path()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  67. 27/32 sha1-name.c: remove the_repo from get_oid_with_context_1()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  68. 28/32 sha1-name.c: add repo_get_oid()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  69. 29/32 submodule-config.c: use repo_get_oid for reading .gitmodulesNguyễn Thái Ngọc Duy, Apr 3, 2019
  70. 30/32 sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_nameNguyễn Thái Ngọc Duy, Apr 3, 2019
  71. 31/32 sha1-name.c: remove the_repo from other get_oid_*Nguyễn Thái Ngọc Duy, Apr 3, 2019
  72. 32/32 sha1-name.c: remove the_repo from get_oid_mb()Nguyễn Thái Ngọc Duy, Apr 3, 2019
  73. 00/33 nd/sha1-name-c-wo-the-repository updatesNguyễn Thái Ngọc Duy, Apr 6, 2019
  74. 01/33 builtin rebase: use FREE_AND_NULLNguyễn Thái Ngọc Duy, Apr 6, 2019
  75. 02/33 builtin rebase: use oideq()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  76. 03/33 packfile.c: add repo_approximate_object_count()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  77. 04/33 refs.c: add refs_ref_exists()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  78. 05/33 refs.c: add refs_shorten_unambiguous_ref()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  79. 06/33 refs.c: remove the_repo from substitute_branch_name()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  80. 07/33 refs.c: remove the_repo from expand_ref()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  81. 08/33 refs.c: add repo_dwim_ref()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  82. 09/33 refs.c: add repo_dwim_log()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  83. 10/33 refs.c: remove the_repo from read_ref_at()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  84. 11/33 commit.c: add repo_get_commit_tree()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  85. 12/33 sha1-name.c: remove the_repo from sort_ambiguous()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  86. 13/33 sha1-name.c: remove the_repo from find_abbrev_len_packed()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  87. 14/33 sha1-name.c: add repo_find_unique_abbrev_r()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  88. 15/33 sha1-name.c: store and use repo in struct disambiguate_stateNguyễn Thái Ngọc Duy, Apr 6, 2019
  89. 16/33 sha1-name.c: add repo_for_each_abbrev()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  90. 17/33 sha1-name.c: remove the_repo from get_short_oid()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  91. 18/33 sha1-name.c: remove the_repo from interpret_nth_prior_checkout()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  92. 19/33 sha1-name.c: remove the_repo from interpret_branch_mark()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  93. 20/33 sha1-name.c: add repo_interpret_branch_name()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  94. 21/33 sha1-name.c: remove the_repo from get_oid_oneline()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  95. 22/33 sha1-name.c: remove the_repo from get_describe_name()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  96. 23/33 sha1-name.c: remove the_repo from get_oid_basic()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  97. 24/33 sha1-name.c: remove the_repo from get_oid_1()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  98. 25/33 sha1-name.c: remove the_repo from handle_one_ref()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  99. 26/33 sha1-name.c: remove the_repo from diagnose_invalid_index_path()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  100. 27/33 sha1-name.c: remove the_repo from resolve_relative_path()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  101. 28/33 sha1-name.c: remove the_repo from get_oid_with_context_1()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  102. 29/33 sha1-name.c: add repo_get_oid()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  103. 30/33 submodule-config.c: use repo_get_oid for reading .gitmodulesNguyễn Thái Ngọc Duy, Apr 6, 2019
  104. 31/33 sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_nameNguyễn Thái Ngọc Duy, Apr 6, 2019
  105. 32/33 sha1-name.c: remove the_repo from other get_oid_*Nguyễn Thái Ngọc Duy, Apr 6, 2019
  106. 33/33 sha1-name.c: remove the_repo from get_oid_mb()Nguyễn Thái Ngọc Duy, Apr 6, 2019
  107. Johannes SchindelinApr 10, 2019
  108. Duy NguyenApr 11, 2019
  109. Johannes SchindelinApr 11, 2019
  110. SZEDER GáborApr 11, 2019
  111. SZEDER GáborApr 11, 2019
  112. SZEDER GáborApr 12, 2019
  113. Johannes SchindelinApr 12, 2019
  114. 11/33 commit.c: add repo_get_commit_tree()Nguyễn Thái Ngọc Duy, Apr 13, 2019
  115. SZEDER GáborApr 13, 2019
  116. Johannes SchindelinApr 15, 2019
  117. SZEDER GáborApr 13, 2019
  118. Duy NguyenApr 13, 2019
  119. 00/34 nd/sha1-name-c-wo-the-repository updatesNguyễn Thái Ngọc Duy, Apr 16, 2019
  120. 01/34 builtin rebase: use FREE_AND_NULLNguyễn Thái Ngọc Duy, Apr 16, 2019
  121. 02/34 builtin rebase: use oideq()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  122. 03/34 packfile.c: add repo_approximate_object_count()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  123. 04/34 refs.c: add refs_ref_exists()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  124. 05/34 refs.c: add refs_shorten_unambiguous_ref()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  125. 06/34 refs.c: remove the_repo from substitute_branch_name()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  126. 07/34 refs.c: remove the_repo from expand_ref()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  127. 08/34 refs.c: add repo_dwim_ref()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  128. 09/34 refs.c: add repo_dwim_log()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  129. 10/34 refs.c: remove the_repo from read_ref_at()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  130. 11/34 commit.cocci: refactor code, avoid double rewriteNguyễn Thái Ngọc Duy, Apr 16, 2019
  131. 12/34 commit.c: add repo_get_commit_tree()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  132. 13/34 sha1-name.c: remove the_repo from sort_ambiguous()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  133. 14/34 sha1-name.c: remove the_repo from find_abbrev_len_packed()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  134. 15/34 sha1-name.c: add repo_find_unique_abbrev_r()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  135. 16/34 sha1-name.c: store and use repo in struct disambiguate_stateNguyễn Thái Ngọc Duy, Apr 16, 2019
  136. 17/34 sha1-name.c: add repo_for_each_abbrev()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  137. 18/34 sha1-name.c: remove the_repo from get_short_oid()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  138. 19/34 sha1-name.c: remove the_repo from interpret_nth_prior_checkout()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  139. 20/34 sha1-name.c: remove the_repo from interpret_branch_mark()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  140. 21/34 sha1-name.c: add repo_interpret_branch_name()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  141. 22/34 sha1-name.c: remove the_repo from get_oid_oneline()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  142. 23/34 sha1-name.c: remove the_repo from get_describe_name()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  143. 24/34 sha1-name.c: remove the_repo from get_oid_basic()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  144. 25/34 sha1-name.c: remove the_repo from get_oid_1()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  145. 26/34 sha1-name.c: remove the_repo from handle_one_ref()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  146. 27/34 sha1-name.c: remove the_repo from diagnose_invalid_index_path()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  147. 28/34 sha1-name.c: remove the_repo from resolve_relative_path()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  148. 29/34 sha1-name.c: remove the_repo from get_oid_with_context_1()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  149. 30/34 sha1-name.c: add repo_get_oid()Nguyễn Thái Ngọc Duy, Apr 16, 2019
  150. 31/34 submodule-config.c: use repo_get_oid for reading .gitmodulesNguyễn Thái Ngọc Duy, Apr 16, 2019
  151. 32/34 sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_nameNguyễn Thái Ngọc Duy, Apr 16, 2019
  152. 33/34 sha1-name.c: remove the_repo from other get_oid_*Nguyễn Thái Ngọc Duy, Apr 16, 2019
  153. 34/34 sha1-name.c: remove the_repo from get_oid_mb()Nguyễn Thái Ngọc Duy, Apr 16, 2019

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.