threads / discuss / 27903

git-show / tig: no indention for commit message

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

## tl;dr

3 messages between May 11, 2011 and Jul 25, 2011.

replies: 2people: 3as markdown or json

Enrico Weigelt· May 11, 2011, 11:36 UTC · lore
Hi folks,

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 ?

cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------
Andreas Schwab· Jul 24, 2011, 07:36 UTC · re: Enrico Weigelt · lore

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

Enrico Weigelt <weigelt@metux.de> writes:
> 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 ?
You could use git cat-file instead.
Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Jonas Fonseca· Jul 25, 2011, 01:29 UTC · re: Enrico Weigelt · lore

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

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

← back to recent threads