help (Windows): Display HTML in default browser using Windows' shell API
commit4804aabcdbffb41dba96825ca2693ea45830a108
authorSteffen Prohaska <prohaska@zib.de>
Sun, 13 Jul 2008 20:31:20 +0000 (13 22:31 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 Jul 2008 21:41:28 +0000 (13 14:41 -0700)
tree97d36d7fea4a6b5414cedf3cb7720beb4bdb189d
parent868da8d5e329c951f0d0cd049a8f9fecda64d388
help (Windows): Display HTML in default browser using Windows' shell API

The system's default browser for displaying HTML help pages is now used
directly on Windows, instead of launching git-web--browser, which
requires a Unix shell.  Avoiding MSYS' bash when possible is good
because it avoids potential path translation issues.  In this case it is
not too hard to avoid launching a shell, so let's avoid it.

The Windows-specific code is implemented in compat/mingw.c to avoid
platform-specific code in the main code base.  On Windows, open_html is
provided as a define.  If open_html is not defined, git-web--browse is
used.  This approach avoids platform-specific ifdefs by using
per-function ifdefs.  The "ifndef open_html" together with the
introductory comment should sufficiently warn developers, so that they
hopefully will not break this mechanism.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c
compat/mingw.h
help.c