You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
meta commit - is set of commands for git repository, which extracts useful information from commits and allows to get more insights from usual actions with repository.
15
+
[meta commit](https://usernam3.github.io/meta_commit/) - is set of commands for git repository, which extracts useful information from commits and allows to get more insights from usual actions with repository.
16
16
17
-
Git is universal distributed version control system and works with minimal common units which exist in any file - strings. Meta commit is utility which gives git information about content of files in repo and changes between commits on level of programming language.
17
+
Git is universal distributed version control system and works with minimal common units which exist in any file - strings. Meta commit is utility which gives git information about content of repository files and changes between commits on level of programming language.
18
18
19
+
## What does meta_commit do ?
19
20
20
-
## Installing meta_commit
21
+
After you read the 'Description section' you may still have question 'What does meta_commit do ?'
21
22
22
-
You can install gem with the following command in a terminal:
23
+
The answer is - it takes diff of each commit in the repository, parse diff content using programming language parser (taken from list of extensions) and try to understand what changes commit introduced on programming language level (not lines level as git does it).
24
+
25
+
26
+
## Installation
27
+
28
+
To install gem you need to run:
23
29
24
30
$ gem install meta_commit
25
31
32
+
> You may need to additionally install the cmake to install rugged (ruby bindings to libgit). It is [known issue](https://github.com/usernam3/meta_commit/issues/19).
33
+
26
34
27
35
## Setup
28
36
29
-
To setup ```meta_commit``` gem for your repository you need to add configuration file to root of repo.
30
-
Currently meta commit expects configuration file with name `.meta_commit.yml` of this format :
37
+
To start using meta_commit, first need to add configuration file to the root of the repository.
(*If you want to use [ruby](https://github.com/meta-commit/ruby_support) and [markdown](https://github.com/meta-commit/markdown_support) extensions you will need also to install them by running `gem install meta_commit_ruby_support meta_commit_markdown_support`*)
47
+
48
+
This command will add `.meta_commit.yml` configuration file with this contents to the repository
31
49
32
50
```YAML
33
51
commands :
@@ -41,32 +59,195 @@ commands :
41
59
42
60
extensions:
43
61
- ruby_support
44
-
- extension2
45
-
- extension3
46
-
- extension4
62
+
- markdown_support
47
63
```
48
64
49
-
This config can be used to change gem behavior, currently it supports only `extensions` key.
50
-
Elements of `extensions` list are gem names (without `meta_commit_` prefix) that will be loaded.
51
-
[Here](https://github.com/usernam3/meta_commit/blob/master/CONTRIBUTING.md) you can get more information about how to create new extension.
65
+
This config can be used to customize gem behavior, currently only `extensions` key is used.
66
+
Items of `extensions` list are gem names (without `meta_commit_` prefix) that will be loaded.
67
+
[Here](https://github.com/usernam3/meta_commit/blob/master/CONTRIBUTING.md#creating-new-extension) you can get more information about how to create the new extension.
52
68
53
69
54
70
## Usage
55
71
72
+
Here you can see usage examples of main meta_commit commands
73
+
56
74
### Message
57
75
58
76
meta_commit message [--directory=$(pwd)]
59
77
60
-
Prints description of current changes in repository index
78
+
Message command prints description of repository working tree staged changes.
79
+
Result of execution of this command is string, that is printed to the console and which represents summary of staged changes.
- change initialization of Errors::MissingConfigError
226
+
- changes in ContextualAstNodeFactory#create_contextual_node
227
+
- changes in ContextualAstNodeFactory#covers_line?
228
+
- changes in DiffFactory#create_diff
229
+
- changes in GitNotes#write_to_notes
230
+
- changes in DiffExaminer#examine_diff
231
+
- changes in DiffIndexExaminer#index_meta
232
+
### Removed
233
+
- changes in method meta
234
+
- changes in method boot_container_with_config
235
+
- changes in method create_ast_path
236
+
- changes in method get_ast_at_line
237
+
- changes in method covers_line
238
+
- changes in method examine_diff
239
+
- changes in method index_meta
240
+
- remove module Models
241
+
242
+
...
243
+
244
+
```
245
+
246
+
247
+
## Extensions
248
+
249
+
Extensions are very important part of meta_commit utility, they are used to parse source files and see difference between commits.
250
+
Idea is that each extension should add new capabilities and knowledge on how to work with the new file extensions.
251
+
Without extensions the meta_commit is just a script which traverses git repository and read files.
252
+
253
+
[Here](https://github.com/usernam3/meta_commit/blob/master/CONTRIBUTING.md#creating-new-extension) you can get more information about how to create new extension.
0 commit comments