Re: [PATCH v6 2/2] mergetools: add winmerge as a builtin tool
- From
Sebastian Schuberth <sschuberth@gmail.com>
- Date
- May 20, 2015, 20:20 UTC
- Message-ID
- <CAHGBnuPyhG4y5ooR7KH0KrEhRYFu9BB+HKnnn+XhU5xL2TnL=w@mail.gmail.com>
- In-Reply-To
- <xmqqtwv7m2hw.fsf@gitster.dls.corp.google.com>
On Wed, May 20, 2015 at 10:13 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> David Aguilar <davvid@gmail.com> writes: > >> + for directory in $(env | grep -Ei '^PROGRAM(FILES(\(X86\))?|W6432)=' | >> + cut -d '=' -f 2- | sort -u) > > Is the final "sort" really desired? I am wondering if there are > fixed precedence/preference order among variants of %PROGRAMFILES% > environment variables that the users on the platform are expected > to stick to, but the "sort" is sorting by the absolute pathnames of > where these things are, which may not reflect that order.
I did add the sort (and -u) by intention, to ensure that "C:\Program Files" (which is what %PROGRAMFILES% expands to by default) comes before "C:\Program Files (x86)" (which is what %PROGRAMFILES(X86)% expands to by default), so that programs of the OS-native bitness are preferred.
-- Sebastian Schuberth