0

I've just upgraded to git 2.32 on my Mac (through brew install git). Now my git-prompt says (branchname|SPARSE) on all local repositories.

I have to run git config core.sparsecheckout false on each repository to get this label to go away:

montag:iPlug2 (master|SPARSE) $ git status
On branch master
Your branch is up to date with 'origin/master'.

You are in a sparse checkout with 100% of tracked files present.

nothing to commit, working tree clean
montag:iPlug2 (master|SPARSE) $ git config core.sparsecheckout false
montag:iPlug2 (master) $

Why is this suddenly appearing, and can I fix it all at once?

Matt Montag
  • 7,105
  • 8
  • 41
  • 47
  • 3
    `git config --global core.sparsecheckout false` ? – matt Aug 14 '21 at 12:27
  • Worked, thanks! I'm still curious about why this happens. – Matt Montag Aug 14 '21 at 19:49
  • Yeah, you'll notice I didn't give it as an answer. My guess is that something about `brew` itself had "leaked" into your global Git settings. But I don't know exactly why that would happen. However, you've now unleaked it so the problem is solved. I'll give it as an answer for now and maybe someone else will come along who knows more. – matt Aug 14 '21 at 20:54

1 Answers1

1

My guess is that somehow brew itself was doing a sparse checkout and the setting "leaked" into your global settings. It sounds like a bug, but it's not very serious. To remove the unwanted global setting, just say

git config --global core.sparsecheckout false
matt
  • 515,959
  • 87
  • 875
  • 1,141