Skip to content

Commit ce45cc2

Browse files
committed
Simplify result accumulation for --list
1 parent efe29ab commit ce45cc2

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
@@ -339,15 +339,15 @@ case "${COMMAND}" in
339339
--list)
340340
if [ ${GLOBAL} -eq 1 ]; then
341341
RESULT=1
342-
if git config --global --get-regex --type path "^secrets\.providers$"; then RESULT=0; fi
343-
if git config --global --get-regex "^secrets\.patterns$"; then RESULT=0; fi
344-
if git config --global --get-regex "^secrets\.allowed$"; then RESULT=0; fi
342+
git config --global --get-regex --type path "^secrets\.providers$" && RESULT=0
343+
git config --global --get-regex "^secrets\.patterns$" && RESULT=0
344+
git config --global --get-regex "^secrets\.allowed$" && RESULT=0
345345
[ $RESULT -eq 0 ]
346346
else
347347
RESULT=1
348-
if git config --get-regex --type path "^secrets\.providers$"; then RESULT=0; fi
349-
if git config --get-regex "^secrets\.patterns$"; then RESULT=0; fi
350-
if git config --get-regex "^secrets\.allowed$"; then RESULT=0; fi
348+
git config --get-regex --type path "^secrets\.providers$" && RESULT=0
349+
git config --get-regex "^secrets\.patterns$" && RESULT=0
350+
git config --get-regex "^secrets\.allowed$" && RESULT=0
351351
[ $RESULT -eq 0 ]
352352
fi
353353
;;

0 commit comments

Comments
 (0)