File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -392,13 +392,15 @@ git_pre_commit() {
392392 # Get prefix of raw file in Git's index using the :FILENAME revision syntax
393393 # The first bytes of an encrypted file are always "Salted" in Base64
394394 local firstbytes=$( git show :" ${secret_file} " | head -c8)
395- if [[ $firstbytes != " U2FsdGVk" ]]; then
395+ if [[ $firstbytes == " " ]]; then
396+ : # Do nothing
397+ elif [[ $firstbytes != " U2FsdGVk" ]]; then
396398 echo " true" >> " ${tmp} "
397399 fi
398400 }
399401
400- # if bash version is 4.4 or greater than fork to number of threads otherwise run normally
401- if [[ " ${BASH_VERSINFO[0]} " -ge 4 ]] && [[ " ${BASH_VERSINFO[1]} " -ge 4 ]]; then
402+ # if bash version is greater than or equal to 4.4, fork to number of threads otherwise run normally
403+ if [[ " ${BASH_VERSINFO[0]} " -gt 4 ]] || { [[ " ${BASH_VERSINFO[0]} " == 4 ]] && [[ " ${BASH_VERSINFO[1]} " -ge 4 ]]; } ; then
402404 num_procs=$( nproc)
403405 num_jobs=" \j"
404406 for secret_file in $( _list_encrypted_files) ; do
You can’t perform that action at this time.
0 commit comments