Skip to content

message-view-patch-regex's wrong default value #5

@titibandit

Description

@titibandit

When following the tutorial over at https://git-send-email.io/, you will send a patch like so:


---
 thibaut | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 thibaut

diff --git a/thibaut b/thibaut
new file mode 100644
index 0000000..7fbef93
--- /dev/null
+++ b/thibaut
@@ -0,0 +1 @@
+I have successfully used git send-email!
\ No newline at end of file
-- 
2.45.0

This patch fails to trigger message-view-patch-want-treatment, because the @@ ... @@ line is formed with only 3 numbers instead of the 4 expected by message-view-patch-regex. I guess that's because this is a new file so there is no hunk context.

I've modified message-view-patch-regex with (message-view-patch-regex '("^@@ -[0-9]+,[0-9]+ \\+[0-9]+\\(,[0-9]+\\)? @@")) and that works now.
But this could be the new default?
Cheers

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