From: Johan Herland Date: Tue, 28 Jul 2015 22:50:56 GMT Subject: Re: [PATCH] notes: handle multiple worktrees Message-ID: In-Reply-To: On Wed, Jul 29, 2015 at 12:12 AM, Junio C Hamano wrote: > David Turner writes: >> Prevent merges to the same notes branch from different worktrees. >> Before creating NOTES_MERGE_REF, check NOTES_MERGE_REF using the same >> code we use to check that two HEADs in different worktrees don't point >> to the same branch. Modify that code, die_if_checked_out, to take a >> "head" ref to examine; previously, it just looked at HEAD. >> >> Reported-by: Junio C Hamano >> Signed-off-by: David Turner >> --- > > Thanks for following through. As I didn't report anything, I do not > deserve that label, but it's OK ;-) > > I know that it is a requirement to protect NOTES_MERGE_REF from > being used by multiple places for "notes merge" to play well with > the multi-worktree world order, but because I do not know if that is > sufficient, I'm asking a few people for further review. As just stated in a related thread, I don't think it makes sense to have NOTES_MERGE_REF per worktree, as the notes merge is always completely unrelated to the current worktree (or the current branch for that matter). AFAICS this patch is all about handling per-worktree NOTES_MERGE_REFs, and as such I'm NAK on this patch. Instead, there should only be one NOTES_MERGE_REF per _repo_, and although we might want to expand to allow multiple concurrent notes merges in the future, that is still a per-repo, and not a per-worktree thing, hence completely unrelated to David's current effort. ...Johan