{"thread":{"id":"46968","subject":"man page for \"git config\" re: GIT_CONFIG and \"-f\" seems weird/wrong","startedAt":"2017-10-14T09:55:58Z","lastAt":"2017-10-14T09:55:58Z","messageCount":1,"participants":["Robert P. J. Day"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"330392","messageId":"alpine.LFD.2.21.1710140538090.5453@localhost.localdomain","threadId":"46968","inReplyTo":null,"subject":"man page for \"git config\" re: GIT_CONFIG and \"-f\" seems weird/wrong","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2017-10-14T09:55:49Z","receivedAt":"2017-10-14T09:55:58Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n  (apologies to those whose email systems barfed on my domain being\nbadly configured WRT MX record, i have been assured by my admin it's\nbeen fixed.)\n\n  reading \"man git-config\", first, it seems awkward that the \"-f\"\noption is explained in terms of GIT_CONFIG even when that variable\nhasn't been introduced yet:\n\n  -f config-file, --file config-file\n     Use the given config file instead of the one specified by GIT_CONFIG.\n\nthe way that's worded makes it seem like GIT_CONFIG *must* have a\nvalue somewhere that is being overridden. perhaps a more general\nexplanation would be something like, \"Explicitly use this, and *only*\nthis config file, regardless of other possible config settings.\"\n\n  it might also be worth mentioning that, once you specify this\noption, also using any of --local, --global or --system will result in\nan error:\n\n  $ git config -l -f ~/gitc --global\n  error: only one config file at a time.\n  ... snip ...\n\n  related to this, under \"ENVIRONMENT\", the explanation for GIT_CONFIG\nseems somewhat draconian:\n\n  GIT_CONFIG\n    Take the configuration from the given file instead of .git/config.\n    Using the \"--global\" option forces this to  ~/.gitconfig. Using\n    the \"--system\" option forces this to $(prefix)/etc/gitconfig.\n\nthe word \"forces\" seems a bit heavy-handed, and the explanation is\nmisleading, anyway ... if you've already set GIT_CONFIG, then using\nany other option of --local, --global or --system produces the same\nerror as before:\n\n  $ git config -l --system\n  error: only one config file at a time.\n  $\n\nin other words, if GIT_CONFIG is already set, using --global or\n--system doesn't \"force\" anything, it's simply an error, no?\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                        http://crashcourse.ca\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"}]}