Open vjustov opened 7 years ago
Hello there. This is an idea I've been meaning to get around to for a while.
Here are my initial thoughts:
I want to make it more composable. Meaning, I should be able to initialize any directory the same way we're initializing the $HOME
directory. That way, it mirrors what git is doing with ~/.gitconfig and then .git/config in each initialized git repo.
Ideally, I would run (this would be a new command):
hitch init .
This would:
.hitch_export_authors
.hitch_pairs
.hitchrc
The hitch command would source the files in the following order:
~/.hitch_export_authors
~/.hitch_pairs
~/.hitchrc
Then the local versions if they're present:
.hitch_export_authors
.hitch_pairs
.hitchrc
This approach would make the current code more reusable. I'll give it more thought but this is kinda the direction I'm leaning toward.
This is a proof of concept that would enable to have a .hitch_pairs localized in a project folder/repo in order to avoid polluting your general .hitch_pairs with one time only devs.
I haven't added tests because i'm still wondering what would be the best way to test this. I think maybe extracting those .hitch_pairs file concerns to its own file would make it easier to test.
I'm opening this PR for discussion.