john smith <wemp...@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.

Reply via email to