Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add git diff filter support #14

Closed
wants to merge 2 commits into from
Closed

Conversation

blaggacao
Copy link
Contributor

attempt towards #11 — please feel free to refine since I don't feel competent for a proper implementation.

@ryantm
Copy link
Owner

ryantm commented Dec 29, 2020

@blaggacao What are you trying to achieve with a git filter?

@blaggacao
Copy link
Contributor Author

Oh, sorry, implicit context 😝

Simply to replace git crypt in nixflk (issue)

@ryantm
Copy link
Owner

ryantm commented Dec 29, 2020

Unless we can come up with some better plan for how to import the files into the NixOS configuration, they need to be encrypted at rest.

@blaggacao
Copy link
Contributor Author

PS: seems as this is the way git crypt works, itself: https://github.com/nrdxp/nixflk/blob/37d40e0cfe4e770a1ef388e93de3bd048d5aaee7/.gitattributes#L1

@blaggacao
Copy link
Contributor Author

Unless we can come up with some better plan for how to import the files into the NixOS configuration, they need to be encrypted at rest.

My assumption was somehow that those git attributes would only affect the git editing workflow. Didn't realize that the checkout is our "at rest" as well. What would happen if we only implement the diff filter? without the smudge and clean? Could be then we would gain elegant diffing, but keeping them encrypted at rest...

@ryantm
Copy link
Owner

ryantm commented Dec 29, 2020

Yeah, a diff filter would be good. Sops supports that. https://github.com/mozilla/sops#showing-diffs-in-cleartext-in-git

@blaggacao
Copy link
Contributor Author

I'll comply this PR to this. Thanks for the advice and the argument.

function git_diff_textconv {
FILE=$1
_decrypt_args
DECRYPT+=("$FILE")
Copy link
Contributor Author

@blaggacao blaggacao Dec 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still have to check this at occasion

@ryantm ryantm changed the title add git filter support add git diff filter support May 14, 2021
@ryantm
Copy link
Owner

ryantm commented Feb 20, 2023

I'm closing this since it has had a merge conflict for a while and no one else has voiced their interest. If this gets picked up again, we should have tests for it.

@ryantm ryantm closed this Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants