git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Andrej Shadura <andrew.shadura@collabora.co.uk>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Andrej Shadura via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 0/2] Add --no-filters option to git-add
Date: Sat, 20 Feb 2021 10:30:58 +0100	[thread overview]
Message-ID: <c660bf7b-cd59-43d4-a374-11997f0b15d1@collabora.co.uk> (raw)
In-Reply-To: <a58d8057-9847-ba57-1bf5-5d27c235d210@collabora.co.uk>

On 20/02/2021 09:06, Andrej Shadura wrote:
> On 19/02/2021 23:36, brian m. carlson wrote:
>> So I think that while this might be a useful escape hatch for users, I
>> definitely want to see a compelling rationale for it and a big warning
>> in the documentation and an update to the relevant entry in the Git FAQ
>> before we accept such a patch.

Here’s my proposal for the updated manpage description of the option:

--no-filters::

Add the contents as is, ignoring any input filter that would have been
chosen by the attributes mechanism, including the end-of-line
conversion. Note that this option is not intended for interactive use,
since files added this way will always show up as modified if Git were
to apply transformations to them, making the situation potentially very
confusing.

And here the FAQ entry extended:

It is also possible for perpetually modified files to occur on any
platform if a smudge or clean filter is in use on your system but a file
was previously committed without running the smudge or clean filter.  To
fix this, run the following on an otherwise clean working tree:
+
----
$ git add --renormalize .
----
+
Another situation where perpetually modified may appear on any platform
is when a file has been committed without running any filters (including
the end-of-line conversion), but the `.gitattributes` file states that
this file requires a conversion.  In this case, you can either
renormalize the files if this happened by mistake, or modify
`.gitattributes` or `$GIT_DIR/info/attributes` as described above to
exempt the file from the conversion if this was intentional.

(I will send an updated patch set when we agree on the wording.)

-- 
Cheers,
  Andrej

  reply	other threads:[~2021-02-20  9:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 18:12 Andrej Shadura via GitGitGadget
2021-02-19 18:12 ` [PATCH 1/2] add: add option --no-filters to disable attribute-based filtering Andrej Shadura via GitGitGadget
2021-02-19 18:12 ` [PATCH 2/2] hash-object: use the new HASH_RAW flag instead of setting path to NULL Andrej Shadura via GitGitGadget
2021-02-19 22:36 ` [PATCH 0/2] Add --no-filters option to git-add brian m. carlson
2021-02-20  8:06   ` Andrej Shadura
2021-02-20  9:30     ` Andrej Shadura [this message]
2021-02-20 14:10       ` brian m. carlson
2021-02-20 17:07 ` [PATCH v2 " Andrej Shadura via GitGitGadget
2021-02-20 17:07   ` [PATCH v2 1/2] add: add option --no-filters to disable attribute-based filtering Andrej Shadura via GitGitGadget
2021-02-20 17:07   ` [PATCH v2 2/2] hash-object: use the new HASH_RAW flag instead of setting path to NULL Andrej Shadura via GitGitGadget
2021-02-20 21:34   ` [PATCH v2 0/2] Add --no-filters option to git-add 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

  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=c660bf7b-cd59-43d4-a374-11997f0b15d1@collabora.co.uk \
    --to=andrew.shadura@collabora.co.uk \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    --subject='Re: [PATCH 0/2] Add --no-filters option to git-add' \
    /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

Code repositories for project(s) associated with this 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).