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

Re: git-show / tig: no indention for commit message

From
Jonas Fonseca <fonseca@diku.dk>
Date
Jul 25, 2011, 01:29 UTC
Message-ID
<CAFuPQ1JY29w+iBsVY_sOLksbz_tTL_JJpe_vpbWWu0Lx3D5mMA@mail.gmail.com>
In-Reply-To
<20110511113655.GB24644@nibiru.local>
On Wed, May 11, 2011 at 07:36, Enrico Weigelt <weigelt@metux.de> wrote:
> I often have to copy+paste commit messages from tig (when putting
> changes into TFS manually ;-o), and the 4-spaces indention is quite
> unhandy here. Is there a way to switch it off ?

Why not configure a keybinding to run a small shell script, where you can use xclip or something similar to copy to the clipboard?

The following .git/config example abuses a git alias (in place of a shell script) to output the raw commit text when P is pressed:

[tig "bind"]
  generic = P !git copy-commit-message %(commit)
[alias]
  copy-commit-message = !"git log --format=%B -1"
-- 
Jonas Fonseca
Previous: Andreas Schwab
Message 3 of 3 in “git-show / tig: no indention for commit message”
  1. Enrico WeigeltMay 11, 2011
  2. Andreas SchwabJul 24, 2011
  3. Jonas FonsecaJul 25, 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.