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

3 messages from 2011-05-11 to 2011-07-25. Participants: Enrico Weigelt, Andreas Schwab, Jonas Fonseca.
Thread: https://gitlist.dev/t/27903

## Enrico Weigelt, 2011-05-11 11:36

Subject: git-show / tig: no indention for commit message
Message-ID: <20110511113655.GB24644@nibiru.local>
URL: https://gitlist.dev/e/20110511113655.GB24644%40nibiru.local

```

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, 2011-07-24 07:36

Subject: Re: git-show / tig: no indention for commit message
Message-ID: <m2pql0m8og.fsf@linux-m68k.org>
URL: https://gitlist.dev/e/m2pql0m8og.fsf%40linux-m68k.org
In-Reply-To: <20110511113655.GB24644@nibiru.local>

```
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, 2011-07-25 01:29

Subject: Re: git-show / tig: no indention for commit message
Message-ID: <CAFuPQ1JY29w+iBsVY_sOLksbz_tTL_JJpe_vpbWWu0Lx3D5mMA@mail.gmail.com>
URL: https://gitlist.dev/e/CAFuPQ1JY29w%2BiBsVY_sOLksbz_tTL_JJpe_vpbWWu0Lx3D5mMA%40mail.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

```
