Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Derek Moore <derek.p.moore@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: smudge filters during checkout & crash consistency
Date: Wed, 12 Nov 2014 10:30:09 -0800	[thread overview]
Message-ID: <xmqqk33046ha.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAMsgyKbox7e2pv4+_=jG6Ywh3Km2gPsw+Qf6qj-28GWrVg7RZQ@mail.gmail.com> (Derek Moore's message of "Wed, 12 Nov 2014 11:46:19 -0600")

Derek Moore <derek.p.moore@gmail.com> writes:

> I have a case where I would like to smudge files according to the
> reflog information of the switching-to branch.

Don't do that.

When you have branches A, B and C, and a path F is the same between
branches A and B but different in branch C, if you start from branch
C and switch to branch A, F will be updated and obtain your smudge
tailored for "branch A's instance of F".

But if you then switch to B from that state, F will not even be
modified (i.e. it will keep the contents you prepared for "branch
A's instance of F").

In short, do not make clean/smudge depend on anything but blob
contents.

  reply	other threads:[~2014-11-12 18:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 17:46 smudge filters during checkout & crash consistency Derek Moore
2014-11-12 18:30 ` Junio C Hamano [this message]
2014-11-12 19:41   ` Derek Moore
2014-11-12 20:30   ` Derek Moore
2014-11-12 20:51     ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=xmqqk33046ha.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=derek.p.moore@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox