{"thread":{"id":"56155","subject":"Bug: the output of \"git remote\" can be confused by global config settings","startedAt":"2021-07-23T18:13:37Z","lastAt":"2021-07-23T18:13:37Z","messageCount":1,"participants":["Daniel Martin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"431075","messageId":"346508F7-BA3D-463D-8924-5C98D5142768@contoso.com","threadId":"56155","inReplyTo":null,"subject":"Bug: the output of \"git remote\" can be confused by global config settings","fromName":"Daniel Martin","fromEmail":"daniel.martin@crowdstrike.com","sentAt":"2021-07-23T17:54:12Z","receivedAt":"2021-07-23T18:13:37Z","isPatch":false,"sender":{"key":"daniel.martin@crowdstrike.com","avatar":null},"body":"Thank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\ngit config --global remote.origin.tagopt --notags\n# much later\nmkdir /tmp/test_dir && cd /tmp/test_dir\ngit init .\ngit remote\ngit remote remove origin\ngit remote -v\n\nWhat did you expect to happen? (Expected behavior)\nI expected \"git remote\" to report only on the remotes that existed in that newly created repository.\n\nI expected \"git remote remove origin\" to succeed since \"git remote\" lied and told me that the newly\ncreated repo had a remote inside it called \"origin\".\n\nWhat happened instead? (Actual behavior)\n\nThe global remote.origin.tagopt config setting convinced \"git remote\" that there was always a\nremote called \"origin\" present, even in a brand new repository.\n\n\"git remove\" could tell that there was no remote called \"origin\":\n\ntest_dir$ git remote\norigin\ntest_dir$ git remote remove origin\nerror: No such remote: 'origin'\ntest_dir$ git remote -v\norigin\t\n\nWhat's different between what you expected and what actually happened?\n\nThe global config setting should not artificially create a remote from the point of\nview of \"git remote\", which should look only at the current repo's configuration and not at\nthe global or system configuration.\n\nAnything else you want to add:\n\n\n\n[System Info]\ngit version:\ngit version 2.32.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Darwin 19.6.0 Darwin Kernel Version 19.6.0: Tue Jun 22 19:49:55 PDT 2021; root:xnu-6153.141.35~1/RELEASE_X86_64 x86_64\ncompiler info: clang: 12.0.0 (clang-1200.0.32.29)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /bin/bash\n\n\n[Enabled Hooks]\n\n"}]}