Use git's -C option to set git's working directory for uncommitted modifications nudge

This commit is contained in:
Colin Dean 2025-08-05 14:49:11 -04:00 committed by GitHub
parent 7d285c0956
commit 60ce25bea0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -703,7 +703,7 @@ module Homebrew
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
pushd #{path} && git stash -u && git clean -d -f && popd
git stash -u -C #{path} && git clean -d -f -C #{path}
EOS
modified = status.split("\n")