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, 23:12 UTC
Message-ID
<xmqqd1kc8y6i.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAKmQUfYCUq=kUTau1-3NjjPVBk6WkP3KdTjgMC8sZtU8h=H4iQ@mail.gmail.com>
john smith <wempwer@gmail.com> writes:
Show 6 quoted lines
> ... get it.  The problem is that in the scenario presented in my last
> e-mail clean filter is run in the situation which doesn't like a
> checkin to me.  Is `git checkout <PATH>' doing a *checkin*" under the
> hood so that the clean filter is called?  What does actually `checkin'
> mean in Git?  I thought that checkin it's the same as committing a
> file into the repository.
I do not know what Jakub meant.

When we need to see if we need to update a working tree file, and when we cannot tell if you modified the working tree file since you checked it out, we may have to run the clean filter (and other conversions collectively called "convert-to-git") on the contents in it and see if the resulting blob matches what is recorded in the index (if they match, there is no need to update the working tree file; if they don't match, we either report that you have a local modification, or we overwrite it with the contents, depending on what operation we are doing for the user).

Previous: john smithNext: Jakub Narębski
Message 9 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.