Skip to content

Commit

Permalink
Import / Repair: GRPP will not set current dir as safe to prevent bul…
Browse files Browse the repository at this point in the history
…lying global .gitconfig file
  • Loading branch information
themitosan committed Dec 7, 2024
1 parent ccfcf12 commit e116a4e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ export async function grpp_startImport(cloneURL:string){
createLogEntry(langDatabase.import.setGitFetchAllRefs);
runExternalCommand('git config remote.origin.fetch "+refs/*:refs/*"', { ...runExternalCommand_Defaults, chdir: repoPath });
})
.then(function(){
createLogEntry(grpp_convertLangVar(langDatabase.import.setPathSafe, [name]));
runExternalCommand(`git config --global --add safe.directory ${repoPath}`, { ...runExternalCommand_Defaults, chdir: originalCwd });
})
.then(function(){
grpp_updateRepoData(`${urlData[2]}/${owner}/${name}`, currentRepo);
createLogEntry(grpp_convertLangVar(langDatabase.import.cloneProcessComplete, [name, repoPath]));
Expand Down
3 changes: 0 additions & 3 deletions src/repair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,6 @@ async function grpp_repairAddMissingRepo(path:string){
// Create log entry and start import process
createLogEntry(grpp_convertLangVar(langDatabase.repair.importMissingRepo, [repoName, path]));
await runExternalCommand('git config remote.origin.fetch "+refs/*:refs/*"', { ...runExternalCommand_Defaults, chdir: path })
.then(function(){
runExternalCommand(`git config --global --add safe.directory ${path}`, { ...runExternalCommand_Defaults, chdir: originalCwd });
})
.then(function(){
grpp_updateRepoData(path.replace(process.cwd(), ''), repoData);
importSuccessCounter++;
Expand Down

0 comments on commit e116a4e

Please sign in to comment.