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

gitattributes - clean filter invoked on pull?

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Apr 11, 2011, 08:42 UTC
Message-ID
<20110411084229.GW5146@genesis.frugalware.org>
Hi,
Background: We at LibreOffice are trying to use the 'filter'
gitattributes feature to clean up line wrappings in po files.

The problem is that it seems the clean filter - which is supposed to be invoked only in case a new blob is created - is invoked even on clone/pull, and other developers are claiming that it slows down their workflow.

Is this a bug? I don't exactly understand why this would be necessary.
Here is a short script to reproduce the issue:

---- rm -rf client* mkdir client cd client git init git config filter.po.clean 'echo foo >&2 && cat' git config filter.po.smudge cat echo '*.po filter=po' > .gitattributes touch foo.po git add .gitattributes foo.po git commit -m foo cd .. git clone client client2 cd client2 git config filter.po.clean 'echo foo >&2 && cat' git config filter.po.smudge cat cd .. cd client echo aaa > foo.po git commit -am second cd .. cd client2/ git pull ----

Its output here with 1.7.4.4:
----
$ sh test.sh 
Initialized empty Git repository in /home/vmiklos/git/t/client/.git/
foo
foo
[master (root-commit) bbf8490] foo
foo
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 .gitattributes
 create mode 100644 foo.po
Cloning into client2...
done.
foo
[master foo
foo
e37f5ab] second
foo
foo
 1 files changed, 1 insertions(+), 0 deletions(-)
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From /home/vmiklos/git/t/client
   bbf8490..e37f5ab  master     -> origin/master
Updating bbf8490..e37f5ab
foo
Fast-forward
foo
 foo.po |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----
Any thoughts why the clean filter is invoked on pull?
Thanks.
Next: Ramkumar Ramachandra
Message 1 of 10 in “gitattributes - clean filter invoked on pull?”
  1. Miklos VajnaApr 11, 2011
  2. Ramkumar RamachandraApr 11, 2011
  3. Miklos VajnaApr 11, 2011
  4. Ramkumar RamachandraApr 11, 2011
  5. Johannes SixtApr 11, 2011
  6. Michael J GruberApr 11, 2011
  7. Miklos VajnaApr 11, 2011
  8. Michael J GruberApr 11, 2011
  9. Miklos VajnaApr 11, 2011
  10. Dmitry PotapovApr 11, 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.