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

Re: How to simulate a real checkout to test a new smudge filter?

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 9, 2016, 22:34 UTC
Message-ID
<xmqqwpik8zy3.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAKmQUfafCP6ZwUm7Ec5n2PzvNzBHnFWEJL1usMTFB6Ef0m=8pw@mail.gmail.com>
john smith <wempwer@gmail.com> writes:
> So it seems that clean filter is only run when checking out paths but
> not when checking out branches.  Is my thinking correct?

If the new branch you are going to and your current branch record different contents for a path, that path will have to be checked out to the working tree, and smudge will be involved in the process to turn the "clean" contents stored in a Git object needs to be smudged for use in the outside world. If both branches have the same contents, then there is no need to overwrite the path in the working tree with the same thing, so it is not touched.

The clean and smudge operations should look _only_ at the contents they are filtering, and nothing else, and the clean/smudge filtering mechanism is designed to support that use case. It is not designed to do things like embedding the name of the branch that is being checked out into the result.

Previous: john smithNext: john smith
Message 7 of 11 in “How to simulate a real checkout to test a new smudge filter?”
  1. john smithSep 6, 2016
  2. Torsten BögershausenSep 6, 2016
  3. john smithSep 6, 2016
  4. Michael J GruberSep 7, 2016
  5. Jakub NarębskiSep 8, 2016
  6. john smithSep 9, 2016
  7. Junio C HamanoSep 9, 2016
  8. john smithSep 9, 2016
  9. Junio C HamanoSep 9, 2016
  10. Jakub NarębskiSep 10, 2016
  11. john smithSep 10, 2016

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.