Skip to content

Use of uninitialized value $less_charset in pattern match #400

@felsenhower

Description

@felsenhower

I am trying to use diff-so-fancy on a system with macOS (Darwin 19.6.0), perl v5.18.4 and git version 2.24.3 (Apple Git-128).
When using it normally (like diff -u f1 f2 | diff-so-fancy), everything seems to be in order. But when setting up git like specified in the README, I get the following:

$ git diff     
Use of uninitialized value $less_charset in pattern match (m//) at /path/to/diff-so-fancy line 530, <STDIN> line 28.

This happens in the function should_print_unicode. I was trying to work around the issue by returning 0 or 1 in the first line of te function, which only leads to the following message:

$ git diff
"my" variable $columns_to_remove masks earlier declaration in same scope at /path/to/diff-so-fancy line 568.

Is this a problem with the installed dependencies or rather with diff-so-fancy?

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