summaryrefslogtreecommitdiffstats
path: root/git-precheck
diff options
context:
space:
mode:
authorMatt Hunter <m@lfurio.us>2026-02-21 17:35:55 -0500
committerMatt Hunter <m@lfurio.us>2026-02-22 18:22:05 -0500
commit2477bb20257689d4d680701934cdb659c8f6fb37 (patch)
tree43098671ed2777f546444c28a30bff41983b1715 /git-precheck
parent0b96dee27bff6276f0f435c52327eecbbd0aa4e5 (diff)
downloadgit-sonar-2477bb20257689d4d680701934cdb659c8f6fb37.tar.gz
git-sonar-2477bb20257689d4d680701934cdb659c8f6fb37.zip
Use git-precheck to determine if we are inside a repository
Use the more robust check implemented by the new git-precheck script, instead of the previous dot_git() logic which checks for a ".git" folder with fallback to git-rev-parse. There is still more work to be done though in refactoring this area of the git-sonar script. Due to the specifics of this new implementation, git-sonar will no longer attempt to operate inside a .git directory or a bare git repository. This makes more sense to me, since git-sonar is intended to be an aid during active development work or branch management from within a working tree. This also avoids some other issues and potential edge cases within the script that fail to run properly in those contexts. git-precheck exits with a code of 3 or less if it successfully determines we are inside a valid git repository working tree, so simply assert this in the is_repo function. Signed-off-by: Matt Hunter <m@lfurio.us>
Diffstat (limited to 'git-precheck')
0 files changed, 0 insertions, 0 deletions