Re: [PATCH v0 0/2] git-less: a specialized pager for git-log

6 messages, 5 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v0 0/2] git-less: a specialized pager for git-log

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:21

Hitoshi Mitake [off-list ref] writes:
If the pager can recognize the end of each commit, more confortable viewing of
git-log's output will be possible.
I think people just use "/^commit .*<RET>" once and then nagivate with "n"
(and to change direction, "?<RET>") for this.
For implementing this feature, I had to make modification of git-log
I do not think the change to "log" is necessary nor worth it.  If the
pager is so specialized to be tied to git, it should learn to recognize
the output from "git", namely, "git log" and "git log -p" would never have
a line that begins with "^commit " that is not the beginning of one record
for a commit.

If you are not comfortable using "less", perhaps a program like "tig" that
is very specialized for working with git might help you better.

Re: [PATCH v0 0/2] git-less: a specialized pager for git-log

From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:53:22

On 03/22/2012 08:00 PM, Junio C Hamano wrote:
Hitoshi Mitake[off-list ref]  writes:
quoted
If the pager can recognize the end of each commit, more confortable viewing of
git-log's output will be possible.
I think people just use "/^commit .*<RET>" once and then nagivate with "n"
(and to change direction, "?<RET>") for this.
Or capital N.

It's mostly useful when one wants to view the patch as well as the message,
so an alias like

    logp = !PAGER='less -p ^commit' git log -p

should work well, and also make LISP nerds giggle.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

Re: [PATCH v0 0/2] git-less: a specialized pager for git-log

From: Hitoshi Mitake <hidden>
Date: 2016-06-15 22:53:22

On Fri, Mar 23, 2012 at 04:00, Junio C Hamano [off-list ref] wrote:
Hitoshi Mitake [off-list ref] writes:
quoted
If the pager can recognize the end of each commit, more confortable viewing of
git-log's output will be possible.
I think people just use "/^commit .*<RET>" once and then nagivate with "n"
(and to change direction, "?<RET>") for this.
Yes, but less cannot search regex with specified range of text
(in this case, from the beginning to the end of the commit).
quoted
For implementing this feature, I had to make modification of git-log
I do not think the change to "log" is necessary nor worth it.  If the
pager is so specialized to be tied to git, it should learn to recognize
the output from "git", namely, "git log" and "git log -p" would never have
a line that begins with "^commit " that is not the beginning of one record
for a commit.
This rule is useful for detection of each commit from pager. I didn't
have to modify git-log... With this rule, the pager can be independent from
the tree of git, thanks!
If you are not comfortable using "less", perhaps a program like "tig" that
is very specialized for working with git might help you better.
Thanks for your information. I didn't know about tig. I'd like to test it or
modify my pager for more comfortable git-log viewing.

Thanks for your feedback,
-- 
Hitoshi Mitake
h.mitake@gmail.com

Re: [PATCH v0 0/2] git-less: a specialized pager for git-log

From: Hitoshi Mitake <hidden>
Date: 2016-06-15 22:53:22

On Fri, Mar 23, 2012 at 19:07, Andreas Ericsson [off-list ref] wrote:
On 03/22/2012 08:00 PM, Junio C Hamano wrote:
quoted
Hitoshi Mitake[off-list ref]  writes:
quoted
If the pager can recognize the end of each commit, more confortable viewing of
git-log's output will be possible.
I think people just use "/^commit .*<RET>" once and then nagivate with "n"
(and to change direction, "?<RET>") for this.
Or capital N.

It's mostly useful when one wants to view the patch as well as the message,
so an alias like

   logp = !PAGER='less -p ^commit' git log -p
Yes, moving is not so large problem. But less cannot search regex with
specified limit. Sometime I want to search string e.g. "something" only in
the commit I'm focusing on.
should work well, and also make LISP nerds giggle.
p? :)
--
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.


-- 
Hitoshi Mitake
h.mitake@gmail.com

Re: [PATCH v0 0/2] git-less: a specialized pager for git-log

From: Alex Plotnick <hidden>
Date: 2016-06-15 22:53:22

I have on occasion also wished to view log messages (especially with
patches) one at a time. And although I agree that a dedicated pager is
overkill, perhaps a small script wouldn't be.

The attached script will eventually run afoul of argument length limits,
but seems to work well otherwise. If you're using less(1), you can step
through the files using :n, :p, and :x.

Cheers,

    -- Alex

Re: [PATCH v0 0/2] git-less: a specialized pager for git-log

From: Jeff Epler <hidden>
Date: 2016-06-15 22:53:26

Hmm, let's say you'd like to view the last 10 commits in a specialized
program that divides them up and provides good search capabilities:
    mutt -f <(git format-patch --stdout -10)
one shortcoming is that the whole git format-patch process must finish
before mutt will begin showing the mailbox .. otherwise, this seems
pretty awesome.

Jeff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help