Menu

#173 Reading notes from `refs/notes/commits` for the "timely commentaries"

open
nobody
None
2020-10-11
2019-12-17
Anonymous
No

Originally created by: phil-blain

I learned today that git format-patch can be told to use the notes (git notes) associated with the commits it is handling to write the "timely commentary" about each patch that gets inserted between the three dash line and the diffstat.

Wouldn't it be great if Gitgitgadget could somehow read the notes associated with commits from a PR (if a contributor has pushed these notes to their GitHub repo under refs/notes/commits/) to insert them in the patches before sending to the mailing list ?

Discussion

  • Anonymous

    Anonymous - 2019-12-17

    Originally posted by: dscho

    While the idea is cute, I am not completely convinced that we can make this work reliably: so far, we simply fetch the commits from gitgitgadget/git, via the refs/pull/<number>/head ref. That ref would obviously not contain those notes.

     
  • Anonymous

    Anonymous - 2020-10-10

    Originally posted by: phil-blain

    @dscho I just had an idea: what if I used GitHub commit comments instead ? would GGG have access more easily to those, through the API ?

     
  • Anonymous

    Anonymous - 2020-10-10

    Originally posted by: dscho

    what if I used GitHub commit comments instead ? would GGG have access more easily to those, through the API ?

    Sure, but how to discern the comments you intended to be included in the patch mails from the comments you did not want to be included?

     
  • Anonymous

    Anonymous - 2020-10-10

    Originally posted by: phil-blain

    Well, personally I would not use the commit comments for anything else then the timely commentaries, so I guess it would be safe to always send this unique per-commit comment (if there is one and the PR author is the comment author).

    As an additional safety, it could be a separate command, i.e. /submit-with-comments, maybe ?

     
  • Anonymous

    Anonymous - 2020-10-11

    Originally posted by: dscho

    Probably would make more sense to implement something like /submit --notes=[refs/notes/]<refname>.

    I still don't like the fact that those notes will be found nowhere near the pr- tags; Currently, those tags have pretty much all the metadata reflecting the entirety of the submission (so that you don't need to be online to look at the submission history).

     

Log in to post a comment.