Skip to content

Conversation

jmurty
Copy link
Collaborator

@jmurty jmurty commented Sep 17, 2025

Tweak the file listing to fix two issues found to affect files with problematic names like "Terrible file""")))(((][][].secret.

This change may undo performance improvements achieved in #193.

  • Ensure the git check-attr filter command does not quote file name characters by using -z arg and some extra trickery to keep space and newline delimiter characters for filter metadata and each file name respectively.

    This fixes a file named "Terrible file""")))(((][][].secret being listed as just Terrible file.

  • Adjust checking for filter and crypt strings to work with changed output from check-attr command.

  • Tweak eval 'echo $filename' portion of command to avoid script crash on files with special characters with error message like eval: line 192: syntax error near unexpected token

…unrecognised names #204

Tweak the file listing to fix two issues found to affect files with
problematic names like `"Terrible file""")))(((][][].secret`.

This change may undo performance improvements achieved in #193.

- Ensure the `git check-attr filter` command does not quote file name
  characters by using `-z` arg and some extra trickery to keep
  space and newline delimiter characters for filter metadata and each
  file name respectively.

  This fixes a file named `"Terrible file""")))(((][][].secret`
  being listed as just `Terrible file`.

- Adjust checking for `filter` and `crypt` strings to work with
  changed output from `check-attr` command.

- Tweak `eval 'echo $filename'` portion of command to avoid script
  crash on files with special characters with error message like
  `eval: line 192: syntax error near unexpected token`
@andreineculau
Copy link
Collaborator

This change may undo performance improvements achieved in #193.

confirmed 😢

@andreineculau
Copy link
Collaborator

What exactly is the problem? I must be blind, but I've just created a "Terrible file""")))(((][][].secret file and ran my version of transcrypt (it says 2.3.2-pre but I'd have to double-check I don't have any local patches) without an issue 🤔
I see this is a filename you came up with, but the user didn't yet reply. What issue to you see with your suggested filename?

Do you actually get .git/crypt/transcrypt: eval: line 192: syntax error near unexpected token ('` ?

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