Tags: Khan/ka-clone
Tags
When running `gitconfig --local`, run it in subdirectories as well. Summary: The advantage of local is it doesn't pollute global state, but the disadvantage is that the settings are not inherited by submodules. (This is a misfeature, in my opinion.) So whenever we set anything --local, we need to manually do it in all submodules as well. This isn't a perfect solution, since if new submodules are added later they won't get the setting -- we'd have to hook into `git p` or something for that -- but it's better than nothing! In particular, it fixes (modulo the caveat above) https://app.asana.com/0/31965416896056/172514774666235 and also https://app.asana.com/0/31965416896056/51708574715815 Update submodules recursively, and do a better job parsing `status` output. I wasn't doing recursive submodules before because I figured they typically weren't *our* code so there was no point in using our configs on them. But there's no harm either, and they *can* be code we care about, so let's just do it. Just use no-arg `split` so we ignore leading spcae and runs of whitespace. No-arg `split` is the best. Test Plan: I ran cd /tmp ~/khan/devtools/ka-clone/bin/ka-clone -p git@github.com:Khan/webapp cd webapp/intl/translations git config -l --local --includes | grep transport and saw it say 'git-bigfile.transport=s3'. On an old version of ka-clone, it did not say that. (same) (same) Reviewers: mroth, benkraft Reviewed By: benkraft Differential Revision: https://phabricator.khanacademy.org/D34584
fix travis-ci by mocking git user Tests assumed user already has a git environment user setup, but travis-ci does not. Mock the user setup in our fake $HOME so travis-ci tests work again. Auditors: csilvers Test Plan: deploy to alternate branch on github, watch travis-ci results
fix broken test introduced with D20231 Summary: the integration tests validate which hooks are installed, and was failing because it was not updated to expect the new pre-rebase hook Test Plan: - make tests Reviewers: csilvers Reviewed By: csilvers Differential Revision: https://phabricator.khanacademy.org/D20238
fix: unlink symlinks before copying git hooks there was an issue where if a git hook with the same name existed already, but was a symlink, ka-clone would overrwrite the link destination’s contents rather than replacing the symlink! apparently this is what python’s `shutil.copyfile` does by design. as a fix, manually unlink any symlinks first to be extra safe, then use `shutil.copy` instead. #devenvfixup Auditors: csilvers, ethan, mopewa
fix regression in --email option and zero args option —email at CLI once again has highest precedence. added an integration test for this instance to make sure it stays fixed. also fixed a regression that had broken printing help by default when given zero args. Review: D18650 Auditors: csilvers, alpert
read default email from gitconfig Summary: check standard git configuration hierarchy for presence of a kaclone.email setting, and if so use that as the default instead of inferring based on environment Reviewers: csilvers Reviewed By: csilvers Subscribers: alpert Projects: #devenvfixup Differential Revision: https://phabricator.khanacademy.org/D18650