On Tue, 19 Apr 2005, Greg KH wrote:
> It looks like your domain name isn't set up properly for your box (which
> is why it worked for you, but not me before, causing that patch).

No, I think it's a bug in your domainname changes. I don't think you
should do the domainname at all if the hostname has a dot in it.

Most machines I have access to (and that includes machines that are
professionally maintained, not just my own cruddy setup) says "(none)" to
domainname and have the full hostname in hostname.

And even the ones that use domainname tend to not have a fully qualified 
DNS domain there. You need to use dnsdomainname to get that, and I don't 
even know how to do it with standard libc.

So how about something like this?

(Somebody who actually knows how these things should be done - please feel 
free to pipe up).


commit-tree.c: 54b636ee1edf596dae1cb9a756eaccdfd5127cef
--- 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), 
+       if (!strchr(realemail+len+1, '.')) {
+               strcat(realemail, ".");
+               getdomainname(realemail+strlen(realemail), 
+       }
        tm = localtime(&now);
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to