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

Fix special characters in file names #388

Merged
merged 3 commits into from
May 12, 2024

Commits on Apr 26, 2024

  1. Fix: file commands do not work with paths containing special characters

    Git escapes special characters in it's output when core.quotePath is
    true or unset. Git always expects unquoted file paths as input. This
    leads to issues when we consume output from git and use it to build
    input for other git commands. This commit ensures we always feed unqoted
    paths to git commands.
    The _forgit_list_files function is introduced to handle usage of git
    ls-files with the -z flag, which ensures unquoted paths.
    It replaces the direct calls to git ls-files in _forgit_reset_head,
    _forgit_stash_push and _forgit_checkout_file.
    In _forgit_add the current approach of using colors to separate unstaged
    from staged files is replaced with a call to _forgit_ls_files with the
    appropriate flags to only list unstaged files.
    In _git_reset_head the -z option is added to the git diff command to
    ensure unqoted paths.
    Since git clean does not support the -z flag, we disable core.quotePath
    by passing a configuration parameter in _forgit_clean.
    sandr01d committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    6ff00ab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1627440 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. Fix: _forgit_add is missing status indicators and files can not be added

    when the sed pattern matches (due to missing indicator)
    sandr01d committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    b082610 View commit details
    Browse the repository at this point in the history