On Mon, 2015-08-03 at 20:55 +0700, Duy Nguyen wrote: > On Fri, Jul 31, 2015 at 1:06 PM, David Turner <dturner@xxxxxxxxxxxxxxxx> 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. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html