git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/3] Die if filter is attempted without a worktree

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Sep 7, 2021, 08:18 UTC
Message-ID
<a20bd60e-7445-131c-e9f3-548bc8dcf1f4@gmail.com>
In-Reply-To
<20210906181002.625647-2-calumlikesapplepie@gmail.com>
On 07/09/21 01.10, Calum McConnell wrote:
Show 5 quoted lines
> +	/* The results of a nonexistent worktree could be... weird.  Lets avoid*/
> +	if(dict[1].value == NULL){
> +		BUG("There is no worktree for this worktree substitution");
> +	}
> +

Why don't simply print that error message without BUG() (aka using die(_("message"))? It can be l10n-ed if you using the approach.

-- 
An old man doll... just what I always wanted! - Clara
Previous: Calum McConnellNext: Calum McConnell
Message 5 of 8 in “Add support for new %w wildcard in checkout filter”
  1. 1/3 Add support for new %w wildcard in checkout filterCalum McConnell, Sep 6, 2021
  2. 2/3 Die if filter is attempted without a worktreeCalum McConnell, Sep 6, 2021
  3. Ævar Arnfjörð BjarmasonSep 6, 2021
  4. Calum McConnellSep 7, 2021
  5. Bagas SanjayaSep 7, 2021
  6. 3/3 Document the new gitattributes changeCalum McConnell, Sep 6, 2021
  7. Jeff KingSep 7, 2021
  8. Junio C HamanoSep 7, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.