This repository was archived by the owner on Jul 3, 2020. It is now read-only.
Commit 937ccc2
committed
WIP: First stab at git post-commit hook
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#inline1 parent 159d128 commit 937ccc2
3 files changed
+49
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
0 commit comments