Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Reminder: Please update ChangeLog before you "git push"



Bart Schaefer wrote:
[...]
> This can be semi-automated with Frank's https://github.com/ft/zsh-am for
> those who may have missed the thread about it.
>
> Also we (including me) have become inconsistent about including the
> zsh-workers article number in the git commit message.  If we ever do get
> around to auto-generating ChangeLog, we'll need that (or need to give up
> linking the ChangeLog to the mailing list).  So for now, best to get back
> in the habit of including it.

Since you mentioned it: With `zsh-am' you can have ChangeLog entries and
X-Seq:-Insertion automated. The basic workflow could look like this:

- ..hack.. ..hack.. ..hack..

- Commit locally with a useful commit message. DO NOT add a ChangeLog
  entry!

- Use format-patch to create a commit-email message (that command
  creates one mail for the topmost patch due to the "-1"):

  % git format-patch -1

- Use send-email to get the mail to the mailing list (this will send the
  patch inline and the mailing list software will insert an X-Seq:
  header, that `zsh-am' will use later):

  % git send-email --to='zsh-workers@xxxxxxx' 0001-*.patch

- When the mail comes back to you, save it to disk (mbox format: this is
  what I tested this stuff with, the module I used should support other
  mailbox formats, too; but most MUAs support mbox, so use that).

- (This step depends a little on how you work. This assumes you made one
  commit your local `master' branch. That's the one you send to the
  mailing list.) => Reset your local master branch:

  % git reset --hard origin/master

- Now import the patch using `zsh-am' (this step adds a ChangeLog entry
  and amends the commit message with the messages X-Seq: message; the
  script has support for mails to -users@ to get a users/1234 prefix)¹:

  % zsh-am ~/the-mbox-your-mua-saved.mbox

- Make sure everthing looks okay:

  % git show

  (Or gitk or tig or whatever...)

- Push the imported commit to the central repository:

  % git push


That's like, a handful of commands and no additional manual work, to do
the "local -> ML -> local -> ChangeLog+X-Seq: -> push" dance.

zsh-am's README goes into a bit more detail about possible workflows, if
you're interested.


Regards, Frank

¹ Caveat: `zsh-am' has to be initialised *once* in the repository it
  should work in. So if you got your zsh clone on ~/src/zsh, here is
  what you do:

  % cd ~/src/zsh
  % zsh-am -init



Messages sorted by: Reverse Date, Date, Thread, Author