On Wed, Jul 29, 2015 at 12:12 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > David Turner <dturner@xxxxxxxxxxxxxxxx> 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 <gitster@xxxxxxxxx> >> Signed-off-by: David Turner <dturner@xxxxxxxxxxxxxxxx> >> --- > > 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 -- 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