Skip to content

Merging encrypted files with conflicts produces encrypted content in the "merged" file #69

@jmurty

Description

@jmurty

When you merge branches containing transcrypt-encrypted files, if the files have conflicts the resulting "merged" file produced by Git for manual resolution ends up as a real mess, mostly or entirely full of the encrypted text which cannot be sensibly merged.

The root problem seems to be that git does not run the smudge/textconv filter on all the BASE, LOCAL, REMOTE conflicting versions of files before attempting a three-way merge, and instead attempts the merge using at least one – and maybe all – of the encrypted versions of these files. E.g. the encrypted content as available from git show :1:FILENAME and git show :2:FILENAME etc mid-merge.

I have not been able to find a workaround just within Git, and have instead added a custom "crypt" merge driver to handle this situation.

Here is a PR against our fork of Transcrypt as an example: ixc#1

This change isn't yet fully tested, and is written against a fairly old version of transcrypt.

Let me know if I should bring it up to date and submit a PR here directly to add the "crypt" merge driver to the latest version of transcrypt?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions