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

Re: [tig] Feeding specific revisions to tig

From
Jeff King <peff@peff.net>
Date
Jun 4, 2008, 19:29 UTC
Message-ID
<20080604192916.GB17327@sigill.intra.peff.net>
In-Reply-To
<ae63f8b50806041152v11a2997y9411c5ea3ebc9598@mail.gmail.com>
On Wed, Jun 04, 2008 at 08:52:14PM +0200, Jean-Baptiste Quenot wrote:
> Ideally I'd like to feed this list of commits to tig, so that I can
> watch the commit diff and summary easily and switch from one commit to
> another.  But tig only behaves as a pager, and does not help for this.
I think there are two issues here, but both are solvable:
  1. You want to see _just_ these commits, but not the whole ancestry
     chain. In that case, you want to use --no-walk. E.g.:
       tig --no-walk commit1 commit2 ...
     Though it seems there are a few display artifacts. If I do
       tig --no-walk tig-0.1 tig-0.2
     I get the 2 commits I expect, but also two "extra" blank
     commits at the bottom.
  2. tig works like a pager when stdin is not a tty. You can work
     around this by using xargs to give the commits to it on the
     command line, and then redirect stdin from the tty.
       ... | xargs sh -c 'tig --no-walk "$@" </dev/tty'
     which is kind of a lot to type. It might be nice for "tig -T"
     to open /dev/tty unconditionally instead of looking at stdin,
     so you could just do:
       ... | xargs tig -T --no-walk
-Peff
Previous: Jean-Baptiste QuenotNext: Jean-Baptiste Quenot
Message 2 of 11 in “[tig] Feeding specific revisions to tig”
  1. Jean-Baptiste QuenotJun 4, 2008
  2. Jeff KingJun 4, 2008
  3. Jean-Baptiste QuenotJun 4, 2008
  4. Jeff KingJun 4, 2008
  5. Jonas FonsecaAug 6, 2008
  6. Jeff KingAug 8, 2008
  7. Jonas FonsecaAug 10, 2008
  8. Jean-Baptiste QuenotApr 23, 2009
  9. Jonas FonsecaApr 27, 2009
  10. Jean-Baptiste QuenotApr 28, 2009
  11. Jean-Baptiste QuenotSep 15, 2011

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.