git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hitoshi Mitake <h.mitake@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Hitoshi Mitake <h.mitake@gmail.com>
Subject: [PATCH v0 0/2] git-less: a specialized pager for git-log
Date: Fri, 23 Mar 2012 03:42:22 +0900	[thread overview]
Message-ID: <1332441744-5142-1-git-send-email-h.mitake@gmail.com> (raw)

Hi Junio C Hamano and git people,

I'd like to post this patch series for adding a pager program for git-log,
named "git-less". It seems that less is today's the most popular pager for
git-log. But I don't think that less is confortable pager when its input is come
from git-log. Because less treats its input as a simple text. So less cannot
recognize the end of each commit.

If the pager can recognize the end of each commit, more confortable viewing of
git-log's output will be possible.

So I'd like to introduce git-less, and the modification of git itself to support
this pager.

The main difference between less and git-less is recognition of each commit.
With this feature, git-log specific functionalities can be implemented. e.g.
* move with commit unit. Under git-less, hitting 'h' key means move to previous
  (parent) commit, 'l' means move to next (child) commit.
* commit local regex search. regular expression search limiting its range within
  commit, not entire log. I assigned '\' for commit local forward regex search
  and '?' for commit local regex search.

And other features like yanking commit ID might be implemented simply (not
implemented yet).

For implementing this feature, I had to make modification of git-log
* Changed output for inserting ETX (0x03) between each commit.
* Added new configuration parameter for git-log only pager: "log.pager".
  git-less only focuses on git-log, so it is not suitable for git-grep, etc.

This is the reason why I'm posting this patch. git-less is not git-independent
program. The source code of git-less have to be integrated with the git tree.
I understand this is not so good manner. And the source code is still dirty and
may be buggy, but I believe that this new pager is useful. I'd like to hear your
feedbacks.

Thanks,

Hitoshi Mitake (2):
  git-less: a specialized pager for git-log
  git-less: git side support for git-less

 .gitignore                |    1 +
 Documentation/git-log.txt |    6 +-
 Makefile                  |    5 +
 builtin/log.c             |   32 ++
 cache.h                   |    1 +
 less.c                    |  899 +++++++++++++++++++++++++++++++++++++++++++++
 pager.c                   |    9 +-
 7 files changed, 949 insertions(+), 4 deletions(-)
 create mode 100644 less.c

-- 
1.7.10.rc1.33.g64ff3.dirty

             reply	other threads:[~2012-03-22 18:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 18:42 Hitoshi Mitake [this message]
2012-03-22 18:42 ` [PATCH v0 1/2] git-less: a specialized pager for git-log Hitoshi Mitake
2012-03-22 18:42 ` [PATCH v0 2/2] git-less: git side support for git-less Hitoshi Mitake
2012-03-22 19:00 ` [PATCH v0 0/2] git-less: a specialized pager for git-log Junio C Hamano
2012-03-23 10:07   ` Andreas Ericsson
2012-03-23 17:18     ` Hitoshi Mitake
2012-03-23 20:44     ` Alex Plotnick
2012-03-30 14:23       ` Jeff Epler
2012-03-23 17:15   ` Hitoshi Mitake
2012-03-24  4:43 ` Nguyen Thai Ngoc Duy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332441744-5142-1-git-send-email-h.mitake@gmail.com \
    --to=h.mitake@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).