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

Re: [PATCH v2] mergetools: add winmerge as a builtin tool

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 13, 2015, 08:10 UTC
Message-ID
<96de4a8c540c041733fd47a4cb1af782@www.dscho.org>
In-Reply-To
<1431482407-63642-1-git-send-email-davvid@gmail.com>
Hi David,
On 2015-05-13 04:00, David Aguilar wrote:
Show 6 quoted lines
> +	if test -n "$ProgramW6432" && test -x "$ProgramW6432/$winmerge_exe"
> +	then
> +		printf '%s' "$ProgramW6432/$winmerge_exe"
> +	elif test -n "$PROGRAMFILES" && test -x "$PROGRAMFILES/$winmerge_exe"
> +	then
> +		printf '%s' "$PROGRAMFILES/$winmerge_exe"
I am terribly sorry that I confused you... What I *meant* was to test in the following order: $PROGRAMFILES, $ProgramW6432, /c/Program Files, /c/Program Files (x86).
While I am already nitpicking, I would also like to throw out the idea to write that in a loop instead (a little bit more DRY):
for directory in "$PROGRAMFILES" "$ProgramW6432" '/c/Program Files' '/c/Program Files (x86)'
do
    test -n "$directory" &&
    test -x "$directory/$winmerge_exe" &&
    echo "$directory/$winmerge_exe" &&
    break
done

Ciao, Dscho

Previous: David AguilarNext: Sebastian Schuberth
Message 2 of 14 in “mergetools: add winmerge as a builtin tool”
  1. mergetools: add winmerge as a builtin toolDavid Aguilar, May 13, 2015
  2. Johannes SchindelinMay 13, 2015
  3. Sebastian SchuberthMay 13, 2015
  4. Johannes SchindelinMay 13, 2015
  5. Sebastian SchuberthMay 13, 2015
  6. Sebastian SchuberthMay 13, 2015
  7. Sebastian SchuberthMay 13, 2015
  8. Sebastian SchuberthMay 13, 2015
  9. SZEDER GáborMay 14, 2015
  10. Sebastian SchuberthMay 15, 2015
  11. SZEDER GáborMay 15, 2015
  12. SZEDER GáborMay 14, 2015
  13. Sebastian SchuberthMay 15, 2015
  14. David AguilarMay 20, 2015

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.