{"thread":{"id":"37843","subject":"\"git foo_bar\" prints two config errors","startedAt":"2014-10-30T13:00:32Z","lastAt":"2014-10-30T13:00:32Z","messageCount":1,"participants":["Mikael Magnusson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"251215","messageId":"CAHYJk3Rf0rXd1=1+7n-PNABQ77MbKphr8T-nLgwdKNUW_iKo2Q@mail.gmail.com","threadId":"37843","inReplyTo":null,"subject":"\"git foo_bar\" prints two config errors","fromName":"Mikael Magnusson","fromEmail":"mikachu@gmail.com","sentAt":"2014-10-30T13:00:32Z","receivedAt":"2014-10-30T13:00:32Z","isPatch":false,"sender":{"key":"mikachu@gmail.com","avatar":null},"body":"% git foo_bar\nerror: invalid key: pager.foo_bar\nerror: invalid key: alias.foo_bar\ngit: 'foo_bar' is not a git command. See 'git --help'.\n\ngit.c calls alias_lookup() and check_pager_config() resulting in calls\nto git_config_parse_key() with the above keys. I looked at the code\nand it's not immediately obvious how to suppress the error in this\nparticular case. You also get an error for the empty argument and\nanything that isn't (isalnum || '-') (I discovered the _ case by\naccidentally leaving out the 'grep' before searching for a function),\n\n% git ''; git の\nerror: key does not contain variable name: pager.\nerror: key does not contain variable name: alias.\ngit: '' is not a git command. See 'git --help'.\nerror: invalid key: pager.の\nerror: invalid key: alias.の\ngit: 'の' is not a git command. See 'git --help'.\n\nbut,\n% ln -s /bin/tty ~/bin/git-の; ln -s /bin/tty ~/bin/git-foo_bar\n% git の\nerror: invalid key: pager.の\n/dev/pts/51\n% git foo_bar\nerror: invalid key: pager.foo_bar\n/dev/pts/51\n\nThe command itself is accepted, so I think we shouldn't print the errors.\n\n-- \nMikael Magnusson\n"}]}