entry: fix filter lookup
commit7297a440122b329c501e70dda099030373af069f
authorJohn Keeping <john@keeping.me.uk>
Thu, 14 Mar 2013 20:00:51 +0000 (14 20:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Mar 2013 21:49:48 +0000 (14 14:49 -0700)
tree21a99bbcae115520fb4dacf2b3bcde0cce187c1e
parent013c3bb81ee1643ce69a64197b2075212492c352
entry: fix filter lookup

When looking up the stream filter, write_entry() should be passing the
path of the file in the repository, not the path to which the content is
going to be written.  This allows the file to be correctly looked up
against the .gitattributes files in the working tree.

This change makes the streaming case match the non-streaming case which
passes ce->name to convert_to_working_tree later in the same function.

The two tests added here test the different paths through write_entry
since the CRLF filter is a streaming filter but the user-defined smudge
filter is not streamed.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
entry.c
t/t2003-checkout-cache-mkdir.sh