git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* gitattributes - clean filter invoked on pull?
@ 2011-04-11  8:42 Miklos Vajna
  2011-04-11  9:19 ` Ramkumar Ramachandra
  2011-04-11 10:04 ` Dmitry Potapov
  0 siblings, 2 replies; 10+ messages in thread
From: Miklos Vajna @ 2011-04-11  8:42 UTC (permalink / raw)
  To: git; +Cc: timar74

[-- Attachment #1: Type: text/plain, Size: 1824 bytes --]

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 #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-04-11 11:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-11  8:42 gitattributes - clean filter invoked on pull? Miklos Vajna
2011-04-11  9:19 ` Ramkumar Ramachandra
2011-04-11  9:31   ` Miklos Vajna
2011-04-11  9:50     ` Ramkumar Ramachandra
2011-04-11 10:00     ` Johannes Sixt
2011-04-11  9:50   ` Michael J Gruber
2011-04-11 10:16     ` Miklos Vajna
2011-04-11 10:41       ` Michael J Gruber
2011-04-11 11:14         ` Miklos Vajna
2011-04-11 10:04 ` Dmitry Potapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).