summaryrefslogtreecommitdiff
path: root/blob.c
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2020-02-24 09:08:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-24 21:04:04 (GMT)
commita80c4c22147bae6d9f9b907b81ab3f4d129ab690 (patch)
treed823fb46b4d4dd239a4c554ac079c954b4d64b05 /blob.c
parentd0654dc308b0ba76dd8ed7bbb33c8d8f7aacd783 (diff)
downloadgit-a80c4c22147bae6d9f9b907b81ab3f4d129ab690.zip
git-a80c4c22147bae6d9f9b907b81ab3f4d129ab690.tar.gz
git-a80c4c22147bae6d9f9b907b81ab3f4d129ab690.tar.bz2
worktree: improve find_worktree() documentation
Do a better job of explaining that find_worktree()'s main purpose is to locate a worktree based upon input from a user which may be some sort of shorthand for identifying a worktree rather than an actual path. For instance, one shorthand a user can use to identify a worktree is by unique path suffix (i.e. given worktrees at paths "foo/bar" and "foo/baz", the latter can be identified simply as "baz"). The actual heuristics find_worktree() uses to select a worktree may be expanded in the future (for instance, one day it may allow worktree selection by <id> of the .git/worktrees/<id>/ administrative directory), thus the documentation does not provide a precise description of how matching is performed, instead leaving it open-ended to allow for future enhancement. While at it, drop mention of the non-NULL requirement of `prefix` since NULL has long been allowed. For instance, prefix_filename() has explicitly allowed NULL since 116fb64e43 (prefix_filename: drop length parameter, 2017-03-20), and find_worktree() itself since e4da43b1f0 (prefix_filename: return newly allocated string, 2017-03-20). Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'blob.c')
0 files changed, 0 insertions, 0 deletions