@@ -1729,7 +1733,7 @@ function syncPresetKeywords() {
}
function populateAdvanced(key, saved) {
- const defaults = {DefaultBranch:true,Branch:'',Multithreading:true,Workers:10,WorkDir:'',
+ const defaults = {DefaultBranch:true,Branch:'',Multithreading:true,Workers:10,WorkDir:'',CloneTimeout:15,
FileExclusion:'',ExtExclusion:[],ExcludeTests:true,ExcludeVendor:true,ExcludeBuild:true,
FolderKeywords:[],FileNamePatterns:DEFAULT_FILE_PATTERNS,Repos:'',Project:'',ResultByFile:true,Org:true};
const cfg = Object.assign({}, defaults, saved);
@@ -1738,6 +1742,8 @@ function populateAdvanced(key, saved) {
document.getElementById('adv-branch').value = cfg.Branch || '';
document.getElementById('adv-multithreading').checked = cfg.Multithreading !== false;
document.getElementById('adv-workers').value = cfg.Workers || 10;
+ const ctEl = document.getElementById('adv-cloneTimeout');
+ if (ctEl) ctEl.value = (cfg.CloneTimeout === undefined || cfg.CloneTimeout === null) ? 15 : cfg.CloneTimeout;
document.getElementById('adv-workDir').value = cfg.WorkDir || '';
document.getElementById('adv-extExclusion').value = Array.isArray(cfg.ExtExclusion)
? cfg.ExtExclusion.filter(Boolean).join(',') : (cfg.ExtExclusion||'');
@@ -1854,6 +1860,12 @@ function gatherConfig() {
cfg.Multithreading = document.getElementById('adv-multithreading').checked;
cfg.Workers = parseInt(document.getElementById('adv-workers').value) || 10;
cfg.NumberWorkerRepos = cfg.Workers;
+ const ctRaw = document.getElementById('adv-cloneTimeout');
+ // Empty/blank field falls back to the default (15); an explicit "0" still disables
+ // the deadline. Treating a cleared field as 0 would silently turn off the very
+ // hang-protection this setting exists for.
+ const ctVal = ctRaw ? ctRaw.value.trim() : '';
+ cfg.CloneTimeout = ctVal === '' ? 15 : (parseInt(ctVal, 10) || 0);
cfg.WorkDir = document.getElementById('adv-workDir').value.trim();
cfg.FileExclusion = '';
const ext = document.getElementById('adv-extExclusion').value.trim();