Skip to content

Long arrays that do not change are showing as changed #124

Description

@aleclandow
diff(
      [
        ['A', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
        ['B', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
      ],
      [
        ['A', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
        ['B', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
      ]
)

yields an output of

[
    [
        "+",
        ["A", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]
    ],
    [
        "~",
        [
            ["-", "A"],  [ "+", "B" ], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "], [" "]
        ]
    ],
    [
        "-",
         ["B", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]
    ]
]

The output shows no change if the array has length 12 or fewer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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