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

Re: [PATCH 2/2] mergetools/tortoisemerge: simplify can_diff() by using "false"

From
Johannes Sixt <j6t@kdbg.org>
Date
Dec 10, 2016, 08:15 UTC
Message-ID
<37d8bc43-9f24-b8e8-cb52-de9cc9b2adde@kdbg.org>
In-Reply-To
<20161210032144.25503-2-davvid@gmail.com>
Am 10.12.2016 um 04:21 schrieb David Aguilar:
Show 16 quoted lines
> Signed-off-by: David Aguilar <davvid@gmail.com>
> ---
> This patch builds upon da/mergetool-trust-exit-code
>
>  mergetools/tortoisemerge | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mergetools/tortoisemerge b/mergetools/tortoisemerge
> index d7ab666a59..9067d8a4e5 100644
> --- a/mergetools/tortoisemerge
> +++ b/mergetools/tortoisemerge
> @@ -1,5 +1,5 @@
>  can_diff () {
> -	return 1
> +	false
>  }
Why is this a simplification?

My concern is that 'false' is not necessarily a shell built-in. Then this is actually a pessimization.

-- Hannes
Previous: David AguilarNext: David Aguilar
Message 3 of 5 in “mergetools/kompare: simplify can_merge() by using "false"”
  1. 1/2 mergetools/kompare: simplify can_merge() by using "false"David Aguilar, Dec 10, 2016
  2. 2/2 mergetools/tortoisemerge: simplify can_diff() by using "false"David Aguilar, Dec 10, 2016
  3. Johannes SixtDec 10, 2016
  4. David AguilarDec 12, 2016
  5. Philip OakleyDec 12, 2016

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.