On Fri, 2015-07-31 at 15:35 -0400, Eric Sunshine wrote: > On Fri, Jul 31, 2015 at 3:01 PM, David Turner <dturner@xxxxxxxxxxxxxxxx> wrote: > > Add a new function, die_if_shared_symref, which works like > > die_if_checked_out, but for all references. Refactor > > die_if_checked_out to work in terms of die_if_shared_symref. > > > > Soon, we will use die_if_shared_symref to protect notes merges in > > worktrees. > > I wonder if the diagnostic: > > 'blorp' is already checked out at '/path/name/' > > emitted by check_linked_checkout() needs to be adjusted for this > change. It still makes sense for die_if_checked_out(), but sounds odd > for die_if_shared_symref(). How about: 'refs/notes/y' is already referenced from 'NOTES_MERGE_REF' in '/home/dturner/git/t/trash directory.t3320-notes-merge-worktrees/' Does that make sense? It's not the only place in the error messages that mentions NOTES_MERGE_REF, so I think we expect users to understand NOTES_MERGE_REF. The alternative is to move the error handling to an even higher level so we can give a notes-specific message. I don't think that's necessary, but I'll do it if others do. <snip; will fix> > > + */ > > +extern void die_if_shared_symref(const char *symref, const char *branch); > > s/branch/referent/ or something? I went with "target" (by analogy to the target of a symlink). -- 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