Skip to content

Behavior with patch dates around the epoch is surprising (and differs from the macOS patch tool at least) #40

@drussel

Description

@drussel

I generated a patch with the diff tool and when I'd apply it with patch-ng (through conan originally) it would confusing delete all the changed files. It turns out it was due to the line below which overwrites the output path (and ignores the patch) on files with bad dates. The mac os patch tool did not exhibit this behavior and it seems like at the very least it should be an error (since there is a change to the file, and an output path).

if (date == b'1970-01-01' or date == b'1969-12-31') and time.split(b':',1)[1] == b'00:00': srcname = b'/dev/null'

Note, the files with the bad dates which caused the diff tool to generate bad dates in the patch were from a conan export-source .tgz (not sure if this is relevant).

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for responseRequires feedback from the user who created the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions