git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
HMHitoshi Mitake <h.mitake@gmail.com>
Date
Mar 22, 2012, 18:42 UTC
Message-ID
<1332441744-5142-1-git-send-email-h.mitake@gmail.com>
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
Next: Hitoshi Mitake
Message 1 of 10 in “git-less: a specialized pager for git-log”
  1. 0/2 git-less: a specialized pager for git-logHitoshi Mitake, Mar 22, 2012
  2. 1/2 git-less: a specialized pager for git-logHitoshi Mitake, Mar 22, 2012
  3. 2/2 git-less: git side support for git-lessHitoshi Mitake, Mar 22, 2012
  4. Junio C HamanoMar 22, 2012
  5. Andreas EricssonMar 23, 2012
  6. Hitoshi MitakeMar 23, 2012
  7. Alex PlotnickMar 23, 2012
  8. Jeff EplerMar 30, 2012
  9. Hitoshi MitakeMar 23, 2012
  10. Nguyen Thai Ngoc DuyMar 24, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.