Parser confused when commit message line starts with "diff"

Open
#462 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start with the Patchwork example at the linked Patchwork Kernel URL and reproduce how a commit message line beginning with "diff" is parsed. The issue names no files or tests, so locate the parser entry point that detects /^diff/ and inspect its handling of commit-message content. Done means a leading "diff" in the message is not mistaken for the patch start, while a real patch header still is.

Written by the indexing model from the issue text.

Description

bug parser

Example here:
https://patchwork.kernel.org/project/git/patch/a4320f2fcf35f180e1c585be4105194f1555a874.1650448612.git.gitgitgadget@gmail.com/

It looks like Patchwork treats the first line matching /^diff/ as the start of the patch, even if that line is actually part of the commit message.

Dominant language
Python
Stars
317
Forks
91
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getpatchwork/patchwork

All issues in getpatchwork/patchwork

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.