The commit email script has some quirks that you should be aware of.
Some unexpected feature is that if you create a new branch (git push origin my_branch:new_branch_that_does_not_exist_yet) an email will be sent only for the last commit message in the branch. If you update an existing branch or you don't care that only the last commit will be emailed (the others will be emailed only if/when somebody merges your branch in an existing branch), you can skip this.
Example:
git checkout -b my_branch master vim file1 git add file1 git commit file1
vim file2 git add file2 git commit file2
git push origin my_branch:tmp/my_new_branch
=> only the 2nd commit will be emailed to the list.
This happens because of the email comit script that tries to send mail only for changes on the branch: it looks at the original branch and at the new branch head and sends an email for all the commits between them . However when creating a new branch, there is not enough information to get the original branch and you either send emails for all the commits since project start (:-)) or only for the last one.
Even if that happen to you, all the commits messages will be sent the first time you merge your new branch into some existing branch.
A way to avoid it in the first place is to first create a new branch, e.g: git checkout -b my_new_branch master git push origin my_new_branch:tmp/my_new_branch
and then push your branch on it: git checkout my_branch git push origin my_branch:tmp/my_new_branch
Andrei
Another catch is the name and address used in From header of commit emails. This is not taken from the commit object itself, but we have a text file on the server which maps usernames to names and email addresses of people.
Thus if the From header does not contain an email address of your choice or if your emails to the mailing list get bounced, please, let us know.
We tried to figure out how to do it without the email mapping file, but it is not easily doable.
The commit scripts in SER CVS repository worked the same way (there was a mapping file too), so this is not a new problem, just less obvious because the email information is also in commit (git) objects themselves and it does not necessarily match the From header of commitlog messages.
Jan.
On 20-11 13:43, Andrei Pelinescu-Onciul wrote:
The commit email script has some quirks that you should be aware of.
Some unexpected feature is that if you create a new branch (git push origin my_branch:new_branch_that_does_not_exist_yet) an email will be sent only for the last commit message in the branch. If you update an existing branch or you don't care that only the last commit will be emailed (the others will be emailed only if/when somebody merges your branch in an existing branch), you can skip this.
Example:
git checkout -b my_branch master vim file1 git add file1 git commit file1
vim file2 git add file2 git commit file2
git push origin my_branch:tmp/my_new_branch
=> only the 2nd commit will be emailed to the list.
This happens because of the email comit script that tries to send mail only for changes on the branch: it looks at the original branch and at the new branch head and sends an email for all the commits between them . However when creating a new branch, there is not enough information to get the original branch and you either send emails for all the commits since project start (:-)) or only for the last one.
Even if that happen to you, all the commits messages will be sent the first time you merge your new branch into some existing branch.
A way to avoid it in the first place is to first create a new branch, e.g: git checkout -b my_new_branch master git push origin my_new_branch:tmp/my_new_branch
and then push your branch on it: git checkout my_branch git push origin my_branch:tmp/my_new_branch
Andrei
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Another "feature" is that the mail address used in the from messages sent to the list is _not_ taken from the commit author field, but from an email map (sip-router/email_map on git.sip-router.org), which maps the username on git.sip-router.org to an email address. So if you want to change your email you _have_ to edit this file or ask someone to change it for your. This was done to have proper "From:"s for cvs2git and svn2git imported commit messages and might be removed in the future, but for the time being this is the way it works.
Andrei