Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Make us be better at guessing a good hostname for the email.
author
Linus Torvalds
<torvalds@ppc970.osdl.org>
Tue, 19 Apr 2005 22:46:06 +0000
(15:46 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Tue, 19 Apr 2005 22:46:06 +0000
(15:46 -0700)
It's still just a guess, and the result is not a real email
address anyway. If you want to, you can use COMMIT_AUTHOR_EMAIL
to correct for any git guesses.
commit-tree.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
17cf781
)
diff --git
a/commit-tree.c
b/commit-tree.c
index 71fce3f357f2287acdeb0e6c62122f4b19e677af..043c7aa371101a1ea8cfc467279abf6c8acc7fd1 100644
(file)
--- a/
commit-tree.c
+++ b/
commit-tree.c
@@
-317,8
+317,10
@@
int main(int argc, char **argv)
memcpy(realemail, pw->pw_name, len);
realemail[len] = '@';
gethostname(realemail+len+1, sizeof(realemail)-len-1);
- strcat(realemail, ".");
- getdomainname(realemail+strlen(realemail), sizeof(realemail)-strlen(realemail)-1);
+ if (!strchr(realemail+len+1, '.')) {
+ strcat(realemail, ".");
+ getdomainname(realemail+strlen(realemail), sizeof(realemail)-strlen(realemail)-1);
+ }
time(&now);
tm = localtime(&now);