gitattributes - clean filter invoked on pull?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: pgpltnY94PrMZ.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]