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

[PATCH 7/7] Plumb in namespaced ref store

From
Richard Maw <richard.maw@gmail.com>
Date
Aug 13, 2017, 19:36 UTC
Message-ID
<20170813193611.4233-8-richard.maw@gmail.com>
In-Reply-To
<20170813193611.4233-1-richard.maw@gmail.com>
---
 refs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index 9a3dcfb..e80244f 100644
--- a/refs.c
+++ b/refs.c
@@ -647,7 +647,6 @@ int refs_delete_ref(struct ref_store *refs, const char *msg,
 	struct strbuf err = STRBUF_INIT;
 
 	if (ref_type(refname) == REF_TYPE_PSEUDOREF) {
-		assert(refs == get_main_ref_store());
 		return delete_pseudoref(refname, old_sha1);
 	}
 
@@ -986,7 +985,6 @@ int refs_update_ref(struct ref_store *refs, const char *msg,
 	int ret = 0;
 
 	if (ref_type(refname) == REF_TYPE_PSEUDOREF) {
-		assert(refs == get_main_ref_store());
 		ret = write_pseudoref(refname, new_sha1, old_sha1, &err);
 	} else {
 		t = ref_store_transaction_begin(refs, &err);
@@ -1589,6 +1587,9 @@ static struct ref_store *ref_store_init(const char *gitdir,
 		die("BUG: reference backend %s is unknown", be_name);
 
 	refs = be->init(gitdir, flags);
+
+	namespaced_ref_store_create(gitdir, &refs);
+
 	return refs;
 }
 
-- 
2.9.0
Previous: Richard MawNext: Stefan Beller
Message 8 of 13 in “Implement ref namespaces as a ref storage backend”
  1. 0/7 Implement ref namespaces as a ref storage backendRichard Maw, Aug 13, 2017
  2. 1/7 Expose expand_namespace APIRichard Maw, Aug 13, 2017
  3. 2/7 Add git_configset_add_standardRichard Maw, Aug 13, 2017
  4. 3/7 Add helper for skipping namespace prefixesRichard Maw, Aug 13, 2017
  5. 4/7 Autocreate reflogs for namespaced refsRichard Maw, Aug 13, 2017
  6. 5/7 Treat namespaced HEAD and refs/bisect as per-worktreeRichard Maw, Aug 13, 2017
  7. 6/7 Add namespaced ref backendRichard Maw, Aug 13, 2017
  8. 7/7 Plumb in namespaced ref storeRichard Maw, Aug 13, 2017
  9. Stefan BellerAug 14, 2017
  10. Junio C HamanoAug 15, 2017
  11. Richard MawAug 24, 2017
  12. Michael HaggertyAug 24, 2017
  13. Richard MawAug 30, 2017

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.