Skip to content

Conversation

@vjustov
Copy link

@vjustov vjustov commented Jul 10, 2016

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.

@therubymug
Copy link
Owner

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:

  1. Make sure the current directory is a git repo and bail if not
  2. Prompt the user with the usual initial hitch setup questions
  3. Create a local version of the following files:
.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants