-
Notifications
You must be signed in to change notification settings - Fork 1
PatchSeries: add a signed-off-by line for the original author #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -490,7 +490,15 @@ export class PatchSeries { | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| logger?.log(`\nheader:\n${header}\n**************`); | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| mails[i] = header + "\n\nFrom: " + authorMatch[2] + match[2]; | ||||||||||||||||||||||||
| let body = match[2]; | ||||||||||||||||||||||||
| if (thisAuthor) { | ||||||||||||||||||||||||
| let senderSignoff = `\nSigned-off-by: ${thisAuthor}\n`; | ||||||||||||||||||||||||
| let authorSignoff = `\nSigned-off-by: ${authorMatch[2]}\n`; | ||||||||||||||||||||||||
| let replaceText = (body.indexOf(authorSignoff) == -1) ? '\n' : authorSignoff; | ||||||||||||||||||||||||
| body = body.replace(senderSignoff, replaceText); | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| mails[i] = header + "\n\nFrom: " + authorMatch[2] + body; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||
|
|
@@ -938,6 +946,7 @@ export class PatchSeries { | |||||||||||||||||||||||
| const args = [ | ||||||||||||||||||||||||
| "format-patch", "--thread", "--stdout", "--signature=ffmpeg-codebot", | ||||||||||||||||||||||||
| "--add-header=Fcc: Sent", | ||||||||||||||||||||||||
| "--signoff", "--zero-commit", | ||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The local git identity where this runs is [email protected], so it would add that to all messages. What would be the purpose of adding
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It inserts the local identity, which we later replace with the original author identity before sending.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GGG is using commit hashes to relate things together like for example syncing comments on the ML back to the GitHub PR. For example here: gitgitgadget/lib/github-glue.ts Lines 190 to 200 in fbf571c
|
||||||||||||||||||||||||
| "--base", mergeBase, this.project.to, | ||||||||||||||||||||||||
| ].concat(PatchSeries.generateSingletonHeaders()); | ||||||||||||||||||||||||
| this.project.cc.map((email) => { | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you show an example of what this is trying to solve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the author already signed-off on the commit, then the signoff inserted by
format-patchis dropped. If they didn't, the inserted signoff is changed to refer to the author.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be easier to insert that line right away instead of going through
format-patch --signoffand replacing later?