Conversation
|
The check against non-local So I think the right fix here would be to check all attributes files, which won't necessarily be easy. |
|
See a potential alternative solution that finds contexts across all gitattributes files, not just one, in #202 |
|
I saw the fix in #202 and the code is 👌 but it doesn't update the add_pattern function And that's also a symptom for why I can't get myself to approve #202 - how will you decide which file to amend with
That's not a reason in itself to allow something, right? Here's a scenario: including a global .gitattributes in the picture means that you and I end up with different transcrypt behaviour. I'm certain that your transcrypt Turing machine is better than mine, but this is how I see things go:
How does that make sense? It means transcrypt relies on out-of-bound information about which files are encrypted and which are not. All of this becomes even more bananas when you think of multiple contexts. Essentially you have an out-of-bound layer of metadata that says which files are encrypted with which context. For what gain exactly? Looking at the git history, I see we starting reading more than just the literal .gitattributes in 150660b 9y ago to "solve" #18 as a way to support Then in 4892d7f we started reading core.attributesFile to resolve #12 to support vcsh ?! Never heard of it, and I can't think of something more niche than this. Except for this case, do you know of other "some people do" and their use-case? All of the above tells me that the current behavior might not be by design. At all. PS: the reasoning might as well be extended to .git/info/attributes - why support it at all? Beyond supporting |
scenario: you have a global .gitattributes for settings crlf, text/binary, diff etc settings
then this is what you get
instead of
although the .gitattributes in the repo has the patterns defined
Point is: do we really support transcrypt globally? with custom contexts?
If we do, then we need to check all attributes files, not only the first one.
PS: on a different note, it also doesn't make sense (to me at least) that
--add=<pattern>write to anything but a local gitattributes