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

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

From
Jeff King <peff@peff.net>
Date
Jun 9, 2013, 06:12 UTC
Message-ID
<20130609061222.GB8906@sigill.intra.peff.net>
In-Reply-To
<vpqzjv0tokx.fsf@anie.imag.fr>
On Sat, Jun 08, 2013 at 09:00:30PM +0200, Matthieu Moy wrote:
Show 6 quoted lines
> > +	# 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. :)
Previous: Matthieu MoyNext: Jeff King
Message 3 of 14 in “git-remote-mediawiki: new tool to preview local changes without pushing”
  1. git-remote-mediawiki: new tool to preview local changes without pushingbenoit.person@ensimag.fr, Jun 7, 2013
  2. Matthieu MoyJun 8, 2013
  3. Jeff KingJun 9, 2013
  4. Jeff KingJun 9, 2013
  5. Matthieu MoyJun 9, 2013
  6. Benoît PersonJun 9, 2013
  7. Jeff KingJun 9, 2013
  8. Benoît PersonJun 9, 2013
  9. Matthieu MoyJun 9, 2013
  10. Jeff KingJun 9, 2013
  11. Benoît PersonJun 11, 2013
  12. Jeff KingJun 11, 2013
  13. Matthieu MoyJun 12, 2013
  14. Jeff KingJun 12, 2013

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.