Page MenuHomePhorge

Genrate `From:`, `Subject:` and `Date` fields in download raw .diff URL
Closed, InvalidPublic

Asked by ton on Apr 13 2023, 23:20.

Details

Hello folks,

As directed, re-submitting https://we.phorge.it/Q46 here:

FreeBSD project gets contributions from multiple sources. Aside from our Phabricator instance we get a good volume of contributions from github.com.
Many FreeBSD maintainers are using "download raw diff" functionality both on github and on Phab to download the patch and then apply it using git am.
Very often the person committing the change is not the same person that authored the change.
Unfortunately Phabricator/Phorge does not include the ownership/attribution information of the patch. Consider these 2 diffs:

As you can see github generates lines From, Date, Subject, emulating email message. This makes it really handy to feed this into git-am
Without this the information about the Author of the change is lost.

man git-am :

The commit author name is taken from the "From: " line of the message,
     and commit author date is taken from the "Date: " line of the message.
     The "Subject: " line is used as the title of the commit, after
     stripping common prefix "[PATCH <anything>]". The "Subject: " line is
     supposed to concisely describe what the commit is about in one line of
     text.

Attribution information is necessary to generate correct commit messages. Example: https://cgit.freebsd.org/src/commit/?id=4c41f4a0d67fc93cfb07ad5287f02d024d19ef5a a change that I authored, but did not commit.

Today FreeBSD maintainers need to add attribution manually when downloading diffs from Phabricator.
Is it possible to add this feature to Phorge? It feels like it shouldn't be too hard todo, considering that Phorge knows author's email, name and date of the submission of the Diff

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.