On Sat, Jun 08, 2013 at 09:00:30PM +0200, Matthieu Moy wrote:

> > +   # Auto-loading in browser
> > +   if ($autoload) {
> > +           open(my $browser, "-|:encoding(UTF-8)", "xdg-open 
> > ".$preview_file_name);
> 
> That could be read from Git's configuration, and default to xdg-open.
> But you don't want to hardcode it in the middle of the code.

In fact, I think we provide the "git-web--browse" tool for just this
purpose. It takes care of the trickiness of looking at the "web.browser"
config, resolving custom browser tools defined by "browser.<tool>.*",
and handling backgrounding of the browser (which you want to do for
graphical browsers but not for terminal ones).

-Peff

PS I agreed with all of the other comments in your review. :)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to