diagnostic: only warn about local newline config
diagnostic: only warn about local newline config

cd to `HOMEBREW_REPOSITORY` before checking git newline settings.

Closes Homebrew/homebrew#49565.

Signed-off-by: Mike McQuaid <a17fed27eaa842282862ff7c1b9c8395a26ac320@mikemcquaid.com>

gregory-nisbet/brew,palxex/brew,Homebrew/brew,pseudocody/brew,rwhogg/brew,reitermarkus/brew,gregory-nisbet/brew,sjackman/homebrew,bfontaine/brew,EricFromCanada/brew,muellermartin/dist,hanxue/linuxbrew,gregory-nisbet/brew,vitorgalvao/brew,Homebrew/brew,reelsense/brew,alyssais/brew,amar-laksh/brew_sudo,JCount/brew,aw1621107/brew,muellermartin/dist,vitorgalvao/brew,rwhogg/brew,mahori/brew,ilovezfs/brew,mgrimes/brew,toonetown/homebrew,Linuxbrew/brew,nandub/brew,jmsundar/brew,MikeMcQuaid/brew,AnastasiaSulyagina/brew,gordonmcshane/homebrew,Linuxbrew/brew,mistydemeo/homebrew,toonetown/homebrew,mistydemeo/homebrew,MikeMcQuaid/brew,gordonmcshane/homebrew,konqui/brew,staticfloat/brew,Linuxbrew/brew,reelsense/brew,aw1621107/brew,JCount/brew,zmwangx/brew,vitorgalvao/brew,alyssais/brew,AnastasiaSulyagina/brew,toonetown/homebrew,ilovezfs/brew,DomT4/brew,DomT4/brew,pseudocody/brew,staticfloat/brew,reelsense/brew,sjackman/homebrew,Homebrew/brew,hanxue/linuxbrew,nandub/brew,JCount/brew,DomT4/brew,claui/brew,reitermarkus/brew,alyssais/brew,mahori/brew,MikeMcQuaid/brew,vitorgalvao/brew,konqui/brew,EricFromCanada/brew,zmwangx/brew,AnastasiaSulyagina/brew,reitermarkus/brew,claui/brew,reitermarkus/brew,maxim-belkin/brew,tonyg/homebrew,maxim-belkin/brew,rwhogg/brew,JCount/brew,sjackman/homebrew,EricFromCanada/brew,bfontaine/brew,amar-laksh/brew_sudo,DomT4/brew,nandub/brew,mahori/brew,nandub/brew,aw1621107/brew,mahori/brew,sjackman/homebrew,EricFromCanada/brew,zmwangx/brew,hanxue/linuxbrew,Linuxbrew/brew,konqui/brew,tonyg/homebrew,gordonmcshane/homebrew,konqui/brew,maxim-belkin/brew,mgrimes/brew,tonyg/homebrew,jmsundar/brew,muellermartin/dist,amar-laksh/brew_sudo,claui/brew,jmsundar/brew,staticfloat/brew,Homebrew/brew,bfontaine/brew,palxex/brew,pseudocody/brew,claui/brew,palxex/brew,MikeMcQuaid/brew,ilovezfs/brew,mistydemeo/homebrew,mgrimes/brew