Re: [PATCH v2] sha1-name.c: for ":/", find detached HEAD commits
On Wed, Jul 11, 2018 at 10:49:09PM -0700, William Chargin wrote:
Show 19 quoted lines
> This patch broadens the set of commits matched by ":/" pathspecs to
> include commits reachable from HEAD but not any named ref. This avoids
> surprising behavior when working with a detached HEAD and trying to
> refer to a commit that was recently created and only exists within the
> detached state.
>
> If multiple worktrees exist, only the current worktree's HEAD is
> considered reachable. This is consistent with the existing behavior for
> other per-worktree refs: e.g., bisect refs are considered reachable, but
> only within the relevant worktree.
>
> Signed-off-by: Jeff King <peff@peff.net>
> Signed-off-by: William Chargin <wchargin@gmail.com>
> Based-on-patch-by: Jeff King <peff@peff.net>
> ---
> Documentation/revisions.txt | 2 +-
> sha1-name.c | 1 +
> t/t4208-log-magic-pathspec.sh | 26 ++++++++++++++++++++++++++
> 3 files changed, 28 insertions(+), 1 deletion(-)
This one looks good to me. Thanks.
-Peff