Skip to content

Commit 193a2bd

Browse files
committed
Simplify result accumulation for --list
1 parent 3f0db40 commit 193a2bd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

git-secrets

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,15 @@ case "${COMMAND}" in
340340
--list)
341341
if [ ${GLOBAL} -eq 1 ]; then
342342
RESULT=1
343-
if git config --global --get-regex --type path "^secrets\.providers$"; then RESULT=0; fi
344-
if git config --global --get-regex "^secrets\.patterns$"; then RESULT=0; fi
345-
if git config --global --get-regex "^secrets\.allowed$"; then RESULT=0; fi
343+
git config --global --get-regex --type path "^secrets\.providers$" && RESULT=0
344+
git config --global --get-regex "^secrets\.patterns$" && RESULT=0
345+
git config --global --get-regex "^secrets\.allowed$" && RESULT=0
346346
[ $RESULT -eq 0 ]
347347
else
348348
RESULT=1
349-
if git config --get-regex --type path "^secrets\.providers$"; then RESULT=0; fi
350-
if git config --get-regex "^secrets\.patterns$"; then RESULT=0; fi
351-
if git config --get-regex "^secrets\.allowed$"; then RESULT=0; fi
349+
git config --get-regex --type path "^secrets\.providers$" && RESULT=0
350+
git config --get-regex "^secrets\.patterns$" && RESULT=0
351+
git config --get-regex "^secrets\.allowed$" && RESULT=0
352352
[ $RESULT -eq 0 ]
353353
fi
354354
;;

0 commit comments

Comments
 (0)