From: Junio C Hamano Date: Sun, 09 Aug 2026 18:17:23 GMT Subject: Re: [PATCH] worktree add: improve message for ambiguous remote branch name Message-ID: In-Reply-To: Junio C Hamano writes: > Junio C Hamano writes: > >>> +static const char message_advice_ambiguous_remote_tracking_branch[] = >>> + N_("If you meant to create a worktree from a remote tracking branch on,\n" >>> + "e.g. 'origin', you can do so by fully qualifying the name:\n" >>> + "\n" >>> + " git worktree add origin/\n" >>> + "\n" >>> ... >>> + char *remote = unique_tracking_name(*new_branch, &oid, &num_matches); >>> + if (!opts->quiet && !remote && num_matches > 1) { >>> + if (advice_enabled(ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME)) >>> + advise(_(message_advice_ambiguous_remote_tracking_branch)); >>> + warning(_("'%s' matched multiple (%d) remote tracking branches\n"), branchname, num_matches); >>> + } Sorry for piecemeal reviews, but I just noticed that you have a terminating LF at the end of a single-liner warning message. As die/error/warning ffamily of helpers give the terminating newline themselves, you must not. Unless you want to leave a blank line after your message, that is. Thanks.