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

Re: [PATCH v5 2/5] refs: add ref_type function

From
David Turner <dturner@twopensource.com>
Date
Aug 11, 2015, 18:39 UTC
Message-ID
<1439318358.5283.20.camel@twopensource.com>
In-Reply-To
<CACsJy8DK9k67yM_mJqbqgDxNKdGKpoLPOQQ4beqGgzUobzyFUQ@mail.gmail.com>
On Mon, 2015-08-03 at 20:55 +0700, Duy Nguyen wrote:
Show 11 quoted lines
> On Fri, Jul 31, 2015 at 1:06 PM, David Turner <dturner@twopensource.com> wrote:
> > Add a function ref_type, which categorizes refs as per-worktree,
> > pseudoref, or normal ref.
> 
> For per-worktree refs, you probably should follow common_list[] in
> path.c because that's how file-based ref namespace is splitted between
> per-repo and per-worktree, even though just as simple as "everything
> outside refs/ is per-worktree" (with an exception of NOTES_MERGE_REF,
> which should be on the list as well). At least the two should be
> aligned so that the default file-based backend works the same way as
> new backends.

I've looked into this, and decided not to follow common_list. That's because I've hacked the path.c code to treat refs/worktree specially; it's under refs (common), but it's per-worktree, so it's special-cased. You may have seen this in the per-worktree-refs-for-bisect thread: http://permalink.gmane.org/gmane.comp.version-control.git/275673

This will require some special-casing in the alternate backends, but they can use common the is_per_worktree_ref function.

Previous: David TurnerNext: David Turner
Message 5 of 13 in “refs: introduce pseudoref and per-worktree ref concepts”
  1. 1/5 refs: introduce pseudoref and per-worktree ref conceptsDavid Turner, Jul 31, 2015
  2. 2/5 refs: add ref_type functionDavid Turner, Jul 31, 2015
  3. Duy NguyenAug 3, 2015
  4. David TurnerAug 3, 2015
  5. David TurnerAug 11, 2015
  6. 3/5 pseudorefs: create and use pseudoref update and delete functionsDavid Turner, Jul 31, 2015
  7. Stefan BellerJul 31, 2015
  8. David TurnerAug 11, 2015
  9. Junio C HamanoAug 11, 2015
  10. Junio C HamanoAug 11, 2015
  11. David TurnerAug 11, 2015
  12. 4/5 bisect: use update_refDavid Turner, Jul 31, 2015
  13. 5/5 sequencer: replace write_cherry_pick_head with update_refDavid Turner, Jul 31, 2015

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.