- on your repo's root, run :
find . -type f | xargs chmod -x - commit this change on files :
commit -n -m 'fix: files permission from 100755 to 100644' - then with
vim .git/config, setfilemodeoption tofalse
[core]
filemode = false
| const fsPromises = require('fs').promises; | |
| const path = require('path'); | |
| /** | |
| * Recursively removes empty directories from the given directory. | |
| * | |
| * If the directory itself is empty, it is also removed. | |
| * | |
| * Code taken from: https://gist.github.com/jakub-g/5903dc7e4028133704a4 | |
| * |
| Element.prototype.parents = function(selector) { | |
| var elements = []; | |
| var elem = this; | |
| var ishaveselector = selector !== undefined; | |
| while ((elem = elem.parentElement) !== null) { | |
| if (elem.nodeType !== Node.ELEMENT_NODE) { | |
| continue; | |
| } | |
| function JSON_to_URLEncoded(element,key,list){ | |
| var list = list || []; | |
| if(typeof(element)=='object'){ | |
| for (var idx in element) | |
| JSON_to_URLEncoded(element[idx],key?key+'['+idx+']':idx,list); | |
| } else { | |
| list.push(key+'='+encodeURIComponent(element)); | |
| } | |
| return list.join('&'); | |
| } |