All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Finn Arne Gangstad <finnag@pvv.org>,
	Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>,
	git@vger.kernel.org
Subject: Re: What's cooking in git.git (Jun 2010, #04; Wed, 23)
Date: Fri, 25 Jun 2010 08:02:00 +0200	[thread overview]
Message-ID: <4C244658.9020704@viscovery.net> (raw)
In-Reply-To: <7veifwchb6.fsf@alter.siamese.dyndns.org>

Am 6/24/2010 22:21, schrieb Junio C Hamano:
> Finn Arne Gangstad <finnag@pvv.org> writes:
>> If .gitattributes is different on the different sides, or if you
>> enable autocrlf, the current repo contents may change after
>> git-to-worktree and worktree-to-git again.
> 
> IOW, g2w-then-w2g may not be an identity function.
> 
> If we were to encourage use of this codepath to wider audiences, we may
> need to have a document for people who write smudge/clean filters.  In
> order for the result to be stable, applying g2w-then-w2g once again on top
> of the result of running g2w-then-w2g on anything should be no-op, no?

I think this is implicit to some degree in the documentation,
gitattributes(5):

  The content filtering is done to massage the content into a shape that
  is more convenient for the platform, filesystem, and the user to use.
  [...] the intent is that if someone unsets the filter driver
  definition, or does not have the appropriate filter program, the
  project should still be usable.

>From this I read that the content of the repository can only be in a
canonical shape; hence, the only thing that a clean filter can do is to
generate the canonical shape of the data. This is, by definition, an
idempotent operation (i.e., g2w(g2w(x)) == g2w(x)).

(I'm talking only about clean filters because any pair of smudge+clean
filters where the clean filter cannot undo the effect of the smudge filter
would be noticed immediately and be considered broken without being
mentioned explicitly in the documentation.)

-- Hannes

  parent reply	other threads:[~2010-06-25  6:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 22:09 What's cooking in git.git (Jun 2010, #04; Wed, 23) Junio C Hamano
     [not found] ` <7veifxe63j.fsf@alter.siamese.dyndns.org>
2010-06-23 22:54   ` [PATCH] bash completion: Support "divergence from upstream" messages in __git_ps1 Shawn O. Pearce
2010-06-23 23:21 ` What's cooking in git.git (Jun 2010, #04; Wed, 23) Ævar Arnfjörð Bjarmason
2010-06-24  0:44 ` Nazri Ramliy
2010-06-24  3:46 ` Tay Ray Chuan
2010-06-24 11:17 ` Finn Arne Gangstad
2010-06-24 11:42   ` Johannes Sixt
2010-06-24 11:58     ` Finn Arne Gangstad
2010-06-24 12:23     ` Eyvind Bernhardsen
2010-06-24 20:21   ` Junio C Hamano
2010-06-24 20:51     ` Eyvind Bernhardsen
2010-06-24 22:48       ` Junio C Hamano
2010-06-25  8:43         ` Finn Arne Gangstad
2010-06-25 19:43         ` Eyvind Bernhardsen
2010-06-25 21:17           ` Junio C Hamano
2010-06-25  6:02     ` Johannes Sixt [this message]
2010-06-25  7:46     ` Finn Arne Gangstad
2010-06-24 14:48 ` Johannes Sixt
2010-06-24 15:33   ` git log --objects Holger Hellmuth
2010-06-25 10:06     ` Santi Béjar
2010-06-24 15:41   ` What's cooking in git.git (Jun 2010, #04; Wed, 23) Clément Poulain
2010-06-25  2:27 ` Christian Couder
2010-06-25 10:30 ` Ævar Arnfjörð Bjarmason
2010-06-25 13:43 ` Michael J Gruber

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=4C244658.9020704@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=eyvind.bernhardsen@gmail.com \
    --cc=finnag@pvv.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.