git tip: adding branch name to subject prefix
So! Annoyed by the fact that git send-email doesn't display the branch
name, I came up with this little hack:
1) Save the attached script as 'git-email-subject-prefix' somewhere in
your path. (I have ~/bin in my path so I used that)
2) Add the following to your ~/.gitconfig (watch the quoting!):
send = !git send-email --subject-prefix="$(git-email-subject-prefix)"
3) Modify the config for your 'lorax' and 'anaconda' repos:
git config sendemail.to email@example.com
Then you use 'git send' instead of 'git send-email' and it automatically
changes the subject prefix according to the settings in the script.
The script checks the 'sendemail.to' setting to see which list it's
sending to. You could modify that script for your workflow(s).
The default settings are:
1) anaconda gets [PATCH branch] (or [PATCH] if master)
2) lorax gets [PATCH lorax/branch]
3) everything else gets the same as anaconda
Hope that's helpful to someone,
Anaconda-devel-list mailing list