* git rev-list --pretty=format:"" issue
@ 2013-04-17 21:11 Forrest Galloway
2013-04-17 22:11 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Forrest Galloway @ 2013-04-17 21:11 UTC (permalink / raw
To: git
git 1.8.2.1 on OSX(Mountain Lion) installed with Homebrew
I am seeing an issue when trying to format the output from rev-list command.
git log --pretty=format:"%H - %an, %ar : %s" When I attempt the above
string, instead of printing to the shell, LESS is opened and the
output is displayed there.
Got the command from here:
http://git-scm.com/book/en/Git-Basics-Viewing-the-Commit-History
git log --pretty=format:"%h - %an, %ar : %s" The string above works
fine when I change the %h to %H the issue shoes up.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git rev-list --pretty=format:"" issue
2013-04-17 21:11 git rev-list --pretty=format:"" issue Forrest Galloway
@ 2013-04-17 22:11 ` Junio C Hamano
2013-04-18 7:30 ` Thomas Rast
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2013-04-17 22:11 UTC (permalink / raw
To: Forrest Galloway; +Cc: git
Forrest Galloway <f.galloway@gmail.com> writes:
> git 1.8.2.1 on OSX(Mountain Lion) installed with Homebrew
>
> I am seeing an issue when trying to format the output from rev-list command.
> git log --pretty=format:"%H - %an, %ar : %s" When I attempt the above
> string, instead of printing to the shell, LESS is opened and the
> output is displayed there.
>
>
> Got the command from here:
> http://git-scm.com/book/en/Git-Basics-Viewing-the-Commit-History
>
> git log --pretty=format:"%h - %an, %ar : %s" The string above works
> fine when I change the %h to %H the issue shoes up.
Actually, less is running in both cases.
We give --quit-if-one-screen (-F) and --chop-long-lines (-S) by
default when we run "less", unless you have your own LESS
environment variable to override our choice, if your history is
shorter than one screenful *and* if your output lines are narrower
than your terminal, it exits after showing the output.
By passing %H instead of %h, you make the output wider, and when
viewing output with --chop-long-lines, less refuses to implicitly
exit with --quit-if-one-screen, because you may want to look at the
RHS end of the output with right/left arrow keys, and it cannot do
so if it exits after showing the last line.
If you do not want pager, run it with no-pager, like this:
git --no-pager log ...your other parameters...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git rev-list --pretty=format:"" issue
2013-04-17 22:11 ` Junio C Hamano
@ 2013-04-18 7:30 ` Thomas Rast
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Rast @ 2013-04-18 7:30 UTC (permalink / raw
To: Forrest Galloway; +Cc: Junio C Hamano, git
Junio C Hamano <gitster@pobox.com> writes:
> Forrest Galloway <f.galloway@gmail.com> writes:
>
>> git 1.8.2.1 on OSX(Mountain Lion) installed with Homebrew
>>
>> I am seeing an issue when trying to format the output from rev-list command.
>> git log --pretty=format:"%H - %an, %ar : %s" When I attempt the above
>> string, instead of printing to the shell, LESS is opened and the
>> output is displayed there.
[...]
>
> Actually, less is running in both cases.
[...]
> If you do not want pager, run it with no-pager, like this:
>
> git --no-pager log ...your other parameters...
Also note that the pager is automatically disabled if you redirect
stdout, so --no-pager is only required in some fringe cases, notably
when attempting to run git under GDB.
--
Thomas Rast
trast@{inf,student}.ethz.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-18 7:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 21:11 git rev-list --pretty=format:"" issue Forrest Galloway
2013-04-17 22:11 ` Junio C Hamano
2013-04-18 7:30 ` Thomas Rast
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).