Re: [PATCH] git-web--browse: invoke kfmclient directly
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 19, 2011, 17:57 UTC
- Message-ID
- <7vvcso9zzi.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20110918183846.GA31176@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> Hmm. Actually, the one for custom browser commands might need it, > because that one is expected to be a shell snippet. I suspect the > simplest thing is to do something like: > > eval "$browser_cmd \"\$@\""
Yeah, I agree, and the dq around $browser_cmd is kind of important, too, for that to work and be readable.
Show 11 quoted lines
> If you want to make a test, I think you would do better with something > like: > > echo someurl_with_&_in_it >expect && > git config browser.custom.cmd echo && > git web--browse --browser=custom someurl_with_&_in_it >actual && > test_cmp expect actual > > That won't test that we are invoking kfmclient correctly, obviously, but > you can confirm at least that URLs are making it through to the browser > script intact.
Hmm, isn't '&' somewhat an unusual in URL? ...ah, not really, if it is in the query parameter part it is quite common.
Thanks.