Skip to content

GitUp does not work with clean/smudge filters? #224

Closed
@mrmachine

Description

@mrmachine

https://github.com/elasticdog/transcrypt is a project that transparently encrypts files within a git repository, using git's clean/smudge filters. This works as expected:

~/test ❯❯❯ git init
Initialized empty Git repository in /Users/tailee/test/.git/
~/test ❯❯❯ transcrypt -y
The repository has been successfully configured by transcrypt.
~/test ❯❯❯ echo 'sensitive_file  filter=crypt diff=crypt' >> .gitattributes
~/test ❯❯❯ echo foo > sensitive_file
~/test ❯❯❯ git add .gitattributes sensitive_file
~/test ❯❯❯ git commit -m 'Add encrypted version of a sensitive file'
[master (root-commit) 392ca6f] Add encrypted version of a sensitive file
 2 files changed, 2 insertions(+)
 create mode 100644 .gitattributes
 create mode 100644 sensitive_file
~/test ❯❯❯ transcrypt -s sensitive_file
==> sensitive_file <==
U2FsdGVkX19CZfq6z9fVIC8B5uHWMBIAE3lMHSs8wJk=

If I use GitUp just to commit (after adding the file to be encrypted via CLI), it also works:

~/test ❯❯❯ git init
Initialized empty Git repository in /Users/tailee/test/.git/
~/test ❯❯❯ transcrypt -y
The repository has been successfully configured by transcrypt.
~/test ❯❯❯ echo 'sensitive_file  filter=crypt diff=crypt' >> .gitattributes
~/test ❯❯❯ echo foo > sensitive_file
~/test ❯❯❯ git add .gitattributes sensitive_file
~/test ❯❯❯ gitup
~/test ❯❯❯ transcrypt -s sensitive_file
==> sensitive_file <==
U2FsdGVkX19D6HIiAQfIwLpD0E9jda/l4ib84wuVNgY=

But if I use GitUp to add (and commit from CLI), it doesn't work:

~/test ❯❯❯ git init
Initialized empty Git repository in /Users/tailee/test/.git/
~/test ❯❯❯ transcrypt -y
The repository has been successfully configured by transcrypt.
~/test ❯❯❯ echo 'sensitive_file  filter=crypt diff=crypt' >> .gitattributes
~/test ❯❯❯ echo foo > sensitive_file
~/test ❯❯❯ gitup
~/test ❯❯❯ git commit -m 'Add encrypted version of a sensitive file'
[master (root-commit) 72b22f5] Add encrypted version of a sensitive file
 2 files changed, 2 insertions(+)
 create mode 100644 .gitattributes
 create mode 100644 sensitive_file
~/test ❯❯❯ transcrypt -s sensitive_file
==> sensitive_file <==
foo

So GitUp is not properly calling the clean/smudge filters when files are staged to the index?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions