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

Re: Un-paged commit messages in git filter-branch's commit-filter?

From
STStefan Tauner <stefan.tauner@gmx.at>
Date
Jul 31, 2016, 16:39 UTC
Message-ID
<0MTjMy-1buKad2Fg8-00QUQV@mail.gmx.com>
In-Reply-To
<20160616095947.GA15988@sigill.intra.peff.net>

On Thu, 16 Jun 2016 05:59:47 -0400 Jeff King <peff@peff.net> wrote:

Show 17 quoted lines
> On Mon, Jun 13, 2016 at 08:28:18AM +0200, Stefan Tauner wrote:
> 
> > I am trying to do a major cleanup of the repository in one of my
> > projects (and switch from git-svn to native git). I have developed a
> > commit-filter script over the last months that massages partially
> > dreadful commit messages into something acceptable. While I am not 100%
> > sure I think that upgrading git has broken it partially. AFAICT since
> > the update the commit-filter does not get the original message anymore
> > but at least the subject/first paragraph is run through a pager or
> > something similar:
> > The first line is broken into multiple lines (i.e. some line breaks are
> > inserted about every 72 characters where none have been before).  
> 
> There are some output formats that will wrap lines, but by default,
> filter-branch should not be using them (and I could not reproduce the
> issue in a simple test). Can you show us what your commit-filter looks
> like?

Thanks for your answer. I have tried to reproduce it in other (newly created) repositories but failed. However, it seems to relate to some kind of persistent paging setting, is that possible? git config -l does not show anything suspicious.

The following commands produce paged output: git show hash git show --pretty=%B git log hash^..hash Commit message in gitk

These do NOT produce paged output: git patch hash^..hash Commit message in gitg 0.2.7

This is the script I tried to use to reproduce the problem:

#!/bin/bash export LC_ALL=C input=$(cat) echo "=========================== $input ===========================" >> /tmp/paging_bug.txt git commit-tree "$@" -m "$input"

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
Previous: Jeff KingNext: Jeff King
Message 3 of 8 in “Un-paged commit messages in git filter-branch's commit-filter?”
  1. Stefan TaunerJun 13, 2016
  2. Jeff KingJun 16, 2016
  3. Stefan TaunerJul 31, 2016
  4. Jeff KingAug 1, 2016
  5. Stefan TaunerAug 1, 2016
  6. Jeff KingAug 1, 2016
  7. Eric WongAug 2, 2016
  8. Stefan TaunerAug 6, 2016

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.