{"thread":{"id":"46287","subject":"Re: [PATCH] completion: optionally disable checkout DWIM","startedAt":"2017-06-29T20:03:39Z","lastAt":"2017-06-29T20:03:39Z","messageCount":1,"participants":["Jason Karns"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"323496","messageId":"CAKNmmv16WG=8=66B8+paiRsjqFKjRKCLPyjEaHkNPsXaOhBCYQ@mail.gmail.com","threadId":"46287","inReplyTo":null,"subject":"Re: [PATCH] completion: optionally disable checkout DWIM","fromName":"Jason Karns","fromEmail":"jason.karns@gmail.com","sentAt":"2017-06-29T20:03:13Z","receivedAt":"2017-06-29T20:03:39Z","isPatch":true,"sender":{"key":"jason.karns@gmail.com","avatar":"https://gravatar.com/avatar/c86e80bb1929ad0ea739f79f04d349adfa550d010fde1bd1ea413b6c277e850f?d=mp&s=160"},"body":"> We could discern between more than just empty vs. non-empty state of\n> the environment variable, e.g.:\n>\n>  - if empty/unset, then include \"DWIM\" suggestions.\n>  - if set to 'config', then query the 'completion.checkoutNoGuess'\n>    configuration variable, and omit \"DWIM\" suggestions if its true.\n>  - if set to something else, then omit \"DWIM\" suggestions.\n\n> Then users can themselves decide, whether the per-repo configurability\n> is worth the overhead of running 'git config'.\n\nI would _definitely_ appreciate this feature. Firstly, thank you for\nthe addition of the environment variable. It is indeed much better\nthan the --no-guess flag.\n\nHowever, I'm in a situation where I very much prefer the DWIM behavior\nfor nearly all of my repos. However, a very few repos have LOTS of\nbranches. And I only wish to disable DWIM in those few repos.\n\nI attempted to create an alias (`git config alias.co 'checkout\n--no-guess'`) in those specific repos. However, that turned out to be\nfoolish since I believe the alias parsing doesn't occur until _after_\nthe shell completion script runs (thus the --no-guess is not actually\npresent in the command parsed by the completion script).\n\nSo I'm back to very much wanting the ability to disable DWIM\nrepo-specific via git-config; and am willing to pay the git-config tax\nas necessary.\n"}]}