diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2020-02-24 04:08:47 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-02-24 13:04:30 -0800 |
commit | bb4995fc3fab35b56f1ca48cda9187bcf340e643 (patch) | |
tree | c160a434298ff0fa78f16bb745b3b7ade472d066 /t/t0051-windows-named-pipe.sh | |
parent | worktree: improve find_worktree() documentation (diff) | |
download | tgif-bb4995fc3fab35b56f1ca48cda9187bcf340e643.tar.xz |
worktree: add utility to find worktree by pathname
find_worktree() employs heuristics to match user provided input -- which
may be a pathname or some sort of shorthand -- with an actual worktree.
Although this convenience allows a user to identify a worktree with
minimal typing, the black-box nature of these heuristics makes it
potentially difficult for callers which already know the exact path of a
worktree to be confident that the correct worktree will be returned for
any specific pathname (particularly a relative one), especially as the
heuristics are enhanced and updated.
Therefore, add a companion function, find_worktree_by_path(), which
deterministically identifies a worktree strictly by pathname with no
interpretation and no magic matching.
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0051-windows-named-pipe.sh')
0 files changed, 0 insertions, 0 deletions