Re: g_get_home_dir (), ${HOME}, and getpwuid ()->pw_dir

On Thu, 2012-09-27 at 12:42 +0700, Ivan Shmakov wrote:

>     Gets the current user's home directory as defined in the password
>     database.
>     Note that in contrast to traditional UNIX tools, this function
>     prefers passwd entries over the HOME environment variable.

The question to answer is simple: why does GLib do what it does now?

"git annotate" says the comment dates from:

commit 5a866843df0d8dc5e5b81fcf2a8a572b6db31521
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Feb 2 06:07:14 2005 +0000

    Move doc comments inline.

Which is just moving around the original comment, so let's dig into

$ git annotate 5a866843df0d8dc5e5b81fcf2a8a572b6db31521^ -- docs/reference/glib/tmpl/misc_utils.sgml

Gives us:

commit ea01de53feb47d592ba6401051ac85375e9a45a9
Author: Matthias Clasen <matthiasc src gnome org>
Date:   Thu Sep 9 14:06:20 2004 +0000

    Clarify the relation of g_get_home_dir() and $HOME.

So...yeah, not very enlightening =/  This kind of thing is a
prime example of why I am constantly asking people to rewrite commit
messages to say *WHY*, not what.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]