[PATCH v6 1/2] worktrees: add find_shared_symref

2015-08-10 Thread David Turner
Add a new function, find_shared_symref, which contains the heart of die_if_checked_out, but works for any symref, not just HEAD. Refactor die_if_checked_out to use the same infrastructure as find_shared_symref. Soon, we will use find_shared_symref to protect notes merges in worktrees.

Re: [PATCH v6 1/2] worktrees: add find_shared_symref

2015-08-10 Thread Eric Sunshine
On Mon, Aug 10, 2015 at 1:52 PM, David Turner dtur...@twopensource.com wrote: worktrees: add find_shared_symref s/worktrees/branch/ perhaps? Add a new function, find_shared_symref, which contains the heart of die_if_checked_out, but works for any symref, not just HEAD. Refactor

Re: [PATCH v6 1/2] worktrees: add find_shared_symref

2015-08-10 Thread David Turner
On Mon, 2015-08-10 at 18:30 -0400, Eric Sunshine wrote: On Mon, Aug 10, 2015 at 1:52 PM, David Turner dtur...@twopensource.com wrote: worktrees: add find_shared_symref s/worktrees/branch/ perhaps? Do you mean this is in branch.c, so should be labeled with branch? Because this change is

Re: [PATCH v6 1/2] worktrees: add find_shared_symref

2015-08-10 Thread Eric Sunshine
On Mon, Aug 10, 2015 at 6:42 PM, David Turner dtur...@twopensource.com wrote: On Mon, 2015-08-10 at 18:30 -0400, Eric Sunshine wrote: On Mon, Aug 10, 2015 at 1:52 PM, David Turner dtur...@twopensource.com wrote: worktrees: add find_shared_symref s/worktrees/branch/ perhaps? Do you mean