Re: [PATCH 12/10] support pager.* for external commands
- From
Jeff King <peff@peff.net>
- Date
- Feb 14, 2012, 19:13 UTC
- Message-ID
- <20120214191340.GC12072@sigill.intra.peff.net>
- In-Reply-To
- <CACBZZX596wnk2KE9QzUPMc=A6Mt8HbUs7F4rnAZbw1_RrcKHnw@mail.gmail.com>
On Sun, Feb 12, 2012 at 01:46:34AM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 24 quoted lines
> On Fri, Aug 19, 2011 at 00:01, Jeff King <peff@peff.net> wrote: > > > +test_expect_success TTY 'command-specific pager works for external commands' ' > > + sane_unset PAGER GIT_PAGER && > > + echo "foo:initial" >expect && > > + >actual && > > + test_config pager.external "sed s/^/foo:/ >actual" && > > + test_terminal git --exec-path="`pwd`" external log --format=%s -1 && > > + test_cmp expect actual > > For reasons that I haven't looked into using sed like that breaks > under /usr/bin/ksh on Solaris. Just using: > > sed -e \"s/^/foo:/\" > > Instead fixes it, it's not broken with /usr/xpg4/bin/sh, so it's some > ksh peculiarity. > > The error it gives is: > > sed s/^/foo:/ >actual: Not found > > Indicating that for some reason it's considering that whole "sed > s/^/foo:/ >actual" string to be a single command.
Hrm. Is the problem on the git-executing side, or is it on the setting up the config side?
Sadly (or perhaps not) I no longer have any Solaris machines to test on. Can you confirm that "git config pager.external" looks OK inside that test? Can you confirm via GIT_TRACE=1 what is being sent to the shell?
Also, it looks like we actually run commands internally from git using "sh -c". So if it is the executing side that is wrong, I don't see how /usr/bin/ksh would be involved at all (it would either be /bin/sh, or /usr/xpg4/bin/sh if you have your PATH set).
-Peff