salarkhan / git-pear

swap credentials after each commit
3 stars 0 forks source link

Stop using exported variables #32

Closed supertopher closed 10 years ago

supertopher commented 10 years ago

We should pass the path as argument instead of exporting PEAR_WORKING_DIR. I think we can simply add it as another argument to uninstall and cycle... which i believe are the only two programs who need to know that location outside of the actual pair app

salarkhan commented 10 years ago

I also think we call git_dir=$(git rev-parse --git-dir) too many times. Either export that sucker or pass it in?

salarkhan commented 10 years ago

Btw I agree on passing PEAR_WORKING_DIR into cycle && uninstall

supertopher commented 10 years ago

i don't like calling things 20 times, but i like that it keeps the individual pieces capable of performing their job without being coupled

create-hook-file for example is fully capable of being a standalone program as it stands

salarkhan commented 10 years ago

Good point. not bad not bad