{"thread":{"id":"34959","subject":"git/path.c - order of accessing ~/.gitconfig","startedAt":"2013-09-18T14:40:06Z","lastAt":"2013-09-18T17:56:45Z","messageCount":3,"participants":["Madhu","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"227839","messageId":"20130918.201006.407922449.enometh@meer.net","threadId":"34959","inReplyTo":null,"subject":"git/path.c - order of accessing ~/.gitconfig","fromName":"Madhu","fromEmail":"enometh@meer.net","sentAt":"2013-09-18T14:40:06Z","receivedAt":"2013-09-18T14:40:06Z","isPatch":false,"sender":{"key":"enometh@meer.net","avatar":null},"body":"\n* commit 21cf32279120799a766d22416be7d82d9ecfbd04\n|\n| Author: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>\n| Date:   Fri Jun 22 11:03:23 2012 +0200\n|\n|    config: read (but not write) from $XDG_CONFIG_HOME/git/config file\n|\n|    Teach git to read the \"gitconfig\" information from a new location,\n|    $XDG_CONFIG_HOME/git/config; this allows the user to avoid\n|    cluttering $HOME with many per-application configuration files.\n|\n|    In the order of reading, this file comes between the global\n|    configuration file (typically $HOME/.gitconfig) and the system wide\n|    configuration file (typically /etc/gitconfig).\n\n\nHowever git/config.c (git_config_early) commit accesses xdg_config\nbefore user_config.  So the comments and documentation are\ninconsistent with the code.\n\n[This looks like an intentional bug, I spotted it when commenting out\n the accesses to files under ~/.config.  (protip: chmod 000 ~/.config helps\n identify and blacklist NWO \"apps\" and now git started complaining) ---Madhu\n"},{"id":"227841","messageId":"vpq8uyuxjfe.fsf@anie.imag.fr","threadId":"34959","inReplyTo":"20130918.201006.407922449.enometh@meer.net","subject":"Re: git/path.c - order of accessing ~/.gitconfig","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-18T15:01:57Z","receivedAt":"2013-09-18T15:01:57Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Madhu <enometh@meer.net> writes:\n\n> * commit 21cf32279120799a766d22416be7d82d9ecfbd04\n> |\n> | Author: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>\n> | Date:   Fri Jun 22 11:03:23 2012 +0200\n> |\n> |    config: read (but not write) from $XDG_CONFIG_HOME/git/config file\n> |\n> |    Teach git to read the \"gitconfig\" information from a new location,\n> |    $XDG_CONFIG_HOME/git/config; this allows the user to avoid\n> |    cluttering $HOME with many per-application configuration files.\n> |\n> |    In the order of reading, this file comes between the global\n> |    configuration file (typically $HOME/.gitconfig) and the system wide\n> |    configuration file (typically /etc/gitconfig).\n>\n>\n> However git/config.c (git_config_early) commit accesses xdg_config\n> before user_config.  So the comments and documentation are\n> inconsistent with the code.\n\nIt seems the commit message is wrong, indeed. But it's too late to fix\nit. OTOH, the documentation seems right to me\n(Documentation/git-config.txt). It says:\n\n  $(prefix)/etc/gitconfig::\n  \tSystem-wide configuration file.\n  \n  $XDG_CONFIG_HOME/git/config::\n  \tSecond user-specific configuration file. If $XDG_CONFIG_HOME is not set\n  \tor empty, `$HOME/.config/git/config` will be used. Any single-valued\n  \tvariable set in this file will be overwritten by whatever is in\n  \t`~/.gitconfig`.  It is a good idea not to create this file if\n  \tyou sometimes use older versions of Git, as support for this\n  \tfile was added fairly recently.\n  \n  ~/.gitconfig::\n  \tUser-specific configuration file. Also called \"global\"\n  \tconfiguration file.\n  \n  $GIT_DIR/config::\n  \tRepository specific configuration file.\n\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"227851","messageId":"20130918.232645.170158661.enometh@meer.net","threadId":"34959","inReplyTo":"vpq8uyuxjfe.fsf@anie.imag.fr","subject":"Re: git/path.c - order of accessing ~/.gitconfig","fromName":"Madhu","fromEmail":"enometh@meer.net","sentAt":"2013-09-18T17:56:45Z","receivedAt":"2013-09-18T17:56:45Z","isPatch":false,"sender":{"key":"enometh@meer.net","avatar":null},"body":"[I posted this via gmane (m3mwnac9ob.fsf@leonis4.robolove.meer.net)\n but the posting hasn't appeared, so I'm sending this by email..]\n\n* Matthieu Moy <vpq8uyuxjfe.fsf@anie.imag.fr> :\nWrote on Wed, 18 Sep 2013 17:01:57 +0200:\n|> * commit 21cf32279120799a766d22416be7d82d9ecfbd04\n|> |    In the order of reading, this file comes between the global\n|> |    configuration file (typically $HOME/.gitconfig) and the system wide\n|> |    configuration file (typically /etc/gitconfig).\n|>\n|> However git/config.c (git_config_early) commit accesses xdg_config\n|> before user_config.  So the comments and documentation are\n|> inconsistent with the code.\n|\n| It seems the commit message is wrong, indeed. But it's too late to fix\n| it. OTOH, the documentation seems right to me\n| (Documentation/git-config.txt). It says:\n\nNo, The commit message is also right.  xdg_config indeed comes betweeen\ngit_etc_gitconfig and user_config, as the commit says, I misunderstood\nwhat the commit was saying because it says this in the reverse order.\nSorry, (nothing to see here) ---Madhu\n"}]}