Skip to content

filterdiff --add[|old|new]prefix should not add prefixes to /dev/null #179

@peat-psuwit

Description

@peat-psuwit

Steps to reproduce: run the following command:

curl --location https://github.com/qt/qtwebengine-chromium/commit/693211aa99fb3fe45547d6833417fa9badda385c.patch | \
    ./src/filterdiff --strip=1 --addprefix=src/3rdparty/

And look at the last changed file, which is actually adding file.

Expected result:

--- /dev/null
+++ src/3rdparty/chromium/third_party/blink/public/strings/blink_strings_grd/IDS_MEDIA_SESSION_DATA_SOURCE.png.sha1
@@ -0,0 +1 @@
+55ed99b05a2a64d5a0552b39828c15b688536eca
\ No newline at end of file

Actual result:

--- src/3rdparty//dev/null
+++ src/3rdparty/chromium/third_party/blink/public/strings/blink_strings_grd/IDS_MEDIA_SESSION_DATA_SOURCE.png.sha1
@@ -0,0 +1 @@
+55ed99b05a2a64d5a0552b39828c15b688536eca
\ No newline at end of file

This is patchutils Git commit b5a6f19 on Ubuntu 26.04.

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