API for changing repository config
kachkaev opened this issue · 3 comments
I'm orchestrating a bunch of repos with GitElephant and everything works just great! Thanks for the wrapper, @matteosister!
The only thing I could not do with the given API is disabling fileMode
in my repos, so that changes in their permissions were invisible to git. Raw command for doing so looks like this: git config core.fileMode false
. My current workaround is this:
$processBuilder = new ProcessBuilder();
$processBuilder->add("/path/to/git");
$processBuilder->add("config");
$processBuilder->add("core.fileMode");
$processBuilder->add("false");
$processBuilder->setWorkingDirectory($myGitRepoDir);
$process = $processBuilder->getProcess();
$process->run();
With GitElephant it could be reduced to this:
$gitRepo->setConfig("core.fileName", "false");
Hi @kachkaev! Thanks for the nice words!
It would be a great addition, and so many months ago I even started something: here is the pull request.
Right now I really don't have any time for this...so if you want to pick up from there, or start over I will be really happy to merge and release!
Same thing with time unfortunately. Good that there is a PR to start with – let's hope someone carries on with it! The new API can be pretty handy in projects when git config
is heavily used. In my case it's just one call in one place.
After reviewing what we have I guess this can be done with addGlobalConfig()
and removeGlobalConfig()
? Otherwise I close it because outdated 😝