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

Re: Interaction between clean/smudge and git status

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 14, 2008, 07:04 UTC
Message-ID
<7vej98apdo.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<4802FE3C.4090306@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 6 quoted lines
> Sergio Callegari schrieb:
>> I have tried for the first time the .gitattributes filter option, setting a
>> clean and a smudge filter for a certain type of files.
>> 
>> What makes me wonder is that using filters, after a clean checkout git status
>> says that everything is changed.

What is to "re-zip"? You have a .zip file that contains a single file in your work tree, and the index and the tree objects record that single file deflated? When you "check out" from the index, you run smudge to create a new .zip file with that single file?

Show 5 quoted lines
>> Is this the expected behaviour of the smudge filter?
>
> I've observed this, too, and I don't think it is expected behavior. But it
> hasn't annoyed me enough to look at it in depth. Eventually I will, and I
> hope to find out what's wrong. ;)

Are you recreating the .zip file in the filter in such a way that a file with the same contents results in byte-to-byte identical .zip file? Otherwise as far as git is concerned you have changed the file in the work tree.

Previous: Johannes SixtNext: Johannes Sixt
Message 3 of 6 in “Interaction between clean/smudge and git status”
  1. Sergio CallegariApr 13, 2008
  2. Johannes SixtApr 14, 2008
  3. Junio C HamanoApr 14, 2008
  4. Johannes SixtApr 14, 2008
  5. Sergio CallegariApr 14, 2008
  6. Sergio CallegariApr 14, 2008

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.