On Thu, Jan 25, 2007 at 08:29:09PM -0800, Josh Triplett wrote:
> Gerrit Pape wrote:
> > On Tue, Jan 16, 2007 at 09:06:58PM -0800, Josh Triplett wrote:
> >> If you run git-log --pretty=foo, it fails with the message "fatal: invalid
> >> --pretty format: foo", but it still opens a pager displaying no content.
> >
> > Hmm, it doesn't for me, neither with 1.4.4.4, nor with 1.4.4.3, can you
> > please re-check?
>
> I can still reproduce this. Investigating more carefully, I found two
> different failure modes, depending on the way you invoke log. If you run
> "git-log --pretty=foo", you get a pager containing the error message. This
> seems wrong, because git-log should not open a pager containing a one-line
> error message; it should just print the error message on stderr. If you run
> "git log --pretty=foo" (note the space, rather than the dash), you get an
> *empty* pager, and an error message at the terminal underneath the pager,
> which you can see when you quit the pager. In both cases, git{-, }log should
> just print the error message to stderr and not open a pager.
You most probably use another pager than less. Before forking the
pager, the git tools set LESS=FRSX in the environment, where F means the
-F option to less ("Causes less to automatically exit if the entire file
can be displayed on the first screen").
less is the default pager for git, I changed it to 'pager' for Debian,
see #369742, maybe I should reverse that patch. I'm not sure it's worth
a fix in the source, does your default pager have a similar option to
less' -F?
Regards, Gerrit.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]