Skip to content

Conversation

andreineculau
Copy link
Collaborator

scenario: you have a global .gitattributes for settings crlf, text/binary, diff etc settings

then this is what you get

$ transcrypt --list-contexts                                                                                                                                                             default (no patterns in .gitattributes)
custom (no patterns in .gitattributes)

instead of

$ transcrypt --list-contexts                                                                                                                                                             default
custom

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

@jmurty
Copy link
Collaborator

jmurty commented May 25, 2025

The check against non-local .gitattributes was added in #137 and although I don't tend to us config files like .gitattributes from outside the immediate repo directory, some people do. I can imagine for example situations where you want transcrypt to encrypt *.secret files across all your projects, in which case putting this in a global .gitattributes would make sense.

So I think the right fix here would be to check all attributes files, which won't necessarily be easy.

@jmurty
Copy link
Collaborator

jmurty commented May 25, 2025

See a potential alternative solution that finds contexts across all gitattributes files, not just one, in #202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants