git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: john smith <wempwer@gmail.com>
Cc: "Jakub Narębski" <jnareb@gmail.com>,
	"Torsten Bögershausen" <tboegi@web.de>,
	git@vger.kernel.org
Subject: Re: How to simulate a real checkout to test a new smudge filter?
Date: Fri, 09 Sep 2016 15:34:44 -0700	[thread overview]
Message-ID: <xmqqwpik8zy3.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAKmQUfafCP6ZwUm7Ec5n2PzvNzBHnFWEJL1usMTFB6Ef0m=8pw@mail.gmail.com> (john smith's message of "Sat, 10 Sep 2016 00:03:26 +0200")

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.


  reply	other threads:[~2016-09-09 22:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 17:47 How to simulate a real checkout to test a new smudge filter? john smith
2016-09-06 19:48 ` Torsten Bögershausen
2016-09-06 21:01   ` john smith
2016-09-07  8:52     ` Michael J Gruber
2016-09-08 13:12     ` Jakub Narębski
2016-09-09 22:03       ` john smith
2016-09-09 22:34         ` Junio C Hamano [this message]
2016-09-09 23:07           ` john smith
2016-09-09 23:12             ` Junio C Hamano
2016-09-10 10:32             ` Jakub Narębski
2016-09-10 16:31               ` john smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqwpik8zy3.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=tboegi@web.de \
    --cc=wempwer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).