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 12:51:16 -0800 [thread overview]
Message-ID: <xmqqfvdo3zy3.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAMsgyKagoz7NU7cGuwvq61aiKc6Wq-z+w0_Fep7t9tYy90pB6w@mail.gmail.com> (Derek Moore's message of "Wed, 12 Nov 2014 14:30:12 -0600")
Derek Moore <derek.p.moore@gmail.com> writes:
>> 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").
>
> Or: the post-commit hook used in the workaround looks up the prior
> branch via @{-1}, finds all files common between @ & @{-1} that don't
> share a latest commit, deletes those files and replaces them singly
> with the results of git-archive using the latest commits of those
> files relative to @. ("All files common between @ & @{-1}" would need
> to be either all non-locally-modified files or making use of git-stash
> {save,pop} to preserve local modifications.) All this assumes having
> reversible $Format$ strings, so the clean filter can restore the
> proper $Format$ string.
>
> Might be worth doing...
I still do not see what you are trying to record in the checked out
source files with your smudge filter, so I won't comment if it might
be "worth" doing.
Your use of reflog suggests me that whatever you are recording
depends on how you acquired your history in your specific repository
you work in, and your result is not reproducible by other people who
work with you by fetching from a repository that is different from
the repository you work in. E.g. perhaps you have a repository at
GitHub and push into there, and others fetch from there into their
repository. What is in their reflog has no relation to what you
have in your reflog.
That's the nature of distrubuted life. More generally, in a
distributred world with merges, even between two people who agree
that the tip of the 'master' branch of the project is at a certain
commit, there is no single sensible answer to the question "which
commit changed this path last?" We wouldn't mind anything you may
do to emulate RCS $Id$, but it would be futile.
prev parent reply other threads:[~2014-11-12 20:51 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
2014-11-12 19:41 ` Derek Moore
2014-11-12 20:30 ` Derek Moore
2014-11-12 20:51 ` Junio C Hamano [this message]
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=xmqqfvdo3zy3.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