Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Conversation

@floehopper
Copy link
Member

The post-commit hook parses the state of the code after each commit to the master branch, builds a tree of method definition "files" using ri-style naming, and adds a corresponding commit to the orphan method-log branch.

  • This code assumes the method-log branch already exists.

  • I've not thought about what happens if the history on master is re-written.

  • There is no explicit reference between the commits on master and those on the method-log branch.

  • I'm not sure how tenable it is to use a Gemfile and bundler for this hook. Maybe an in-line Gemfile might be better.

  • I've duplicated some code from elsewhere in the repo, e.g. #unindent.

  • I've used instance_variable_get on the instance of MethodFinder, but it would be easy to surface this as a public attribute reader method.

@floehopper
Copy link
Member Author

Note that the code in this branch is very similar to that in the recently added build_methods_repo script.

The post-commit hook parses the state of the code after each commit to the
`master` branch, builds a tree of method definition "files" using ri-style
naming, and adds a corresponding commit to the orphan `method-log` branch.

* This code assumes the `method-log` branch already exists.

* I've not thought about what happens if the history on `master` is re-written.

* There is no explicit reference between the commits on `master` and those on
the `method-log` branch.

* I'm not sure how tenable it is to use a `Gemfile` and bundler for this hook.
Maybe an in-line `Gemfile` [1] might be better.

* I've duplicated some code from elsewhere in the repo, e.g. `#unindent`.

* I've used `instance_variable_get` on the instance of `MethodFinder`, but it
would be easy to surface this as a public attribute reader method.

[1]: http://bundler.io/whats_new.html#inline
@floehopper floehopper force-pushed the git-post-commit-hook branch from 937ccc2 to d1ea62d Compare June 18, 2019 18:38
@floehopper
Copy link
Member Author

Rebased against master and force-pushed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants