commit.md

Please do the following.

  • Always follow Conventional Commits.
  • Only stage files you've directly changed during this conversation.
  • Trailer references
    • Issue/bug trailer options
      • Fixes:
      • Implements:
      • References:
      • Closes:
    • Include yourself in the Co-authored-by trailer.
    • Always look for a number in the branch name, like 3-new-feature or user/fix-thing_36. Only if there is,
      • Run git remote -v and notice whether any of the remotes include 'soprani.ca', 'sopranica', 'singpolyma', or 'sgx-XXX' where XXX is an arbitrary string (for example, sgx-jmp, sgx-bwmsgsv2, sgx-endstream, etc.). If any of those keywords are found, run hut todo -t '~singpolyma/soprani.ca' ticket show NUMBER-FROM-BRANCH-NAME to see the ticket we're working on and surrounding discussion.
      • Depending on commit contents and bug contents, ask me which trailer to use. Format the trailer value like https://todo.sr.ht/~singpolyma/soprani.ca/TICKET_NUM. If there is no number in the branch name or the remotes don't contain any of the keywords, do not include a trailer.
    • Always look for a short hash in the branch name, like 40cd4d1-sort-branches-by-updatedat or user/9ebc998_pin-default-branch or horizontal-navbar-on-mobile/6016e27 and so on. Only if there is,
      • Run git-bug bug show HASH to see the bug we're working on and surrounding discussion.
      • Depending on commit contents and bug contents, ask me which trailer to use. Format the trailer value like bug-HASH. If there is no hash in the branch name, do not include a trailer.
      • After creating the commit, ask whether to close the bug. If I say yes, close it with git-bug bug status close HASH.
  • Check whether there are already staged changes.
    • If no, look at the git status, then look at our conversation above.
      • If you do not notice View/Edit-related activity for the files/dirs referenced in the git status output, STOP and ask me which changes you should stage, analyse, then commit. Present the changes as per-file bullets with summaries.
      • If you do notice View/Edit activity for the changed files, git add them, then STOP and ask me whether to stage any of the other files. Present the changes as per-file bullets with summaries.
    • If yes, analyse the changes and craft your commit message.