@@ -78,16 +78,16 @@ project's version. Not Yet Implemented means it does not exist yet:
78
78
| ** Git Commits per Hour by Author** | Completed ✔️ | Shows hourly commit count hour by given author. |
79
79
| ** Git Commits per Timezone** | Completed ✔️ | Counts commits based on timezones. |
80
80
| ** Git Commits per Timezone by Author** | Completed ✔️ | Shows timezone-based commit counts by given author. |
81
- | ** Since Variable Adjustable by User** | Not Yet Implemented ❌ | Allows users to set the starting point for commit logs. |
82
- | ** Until Variable Adjustable by User** | Not Yet Implemented ❌ | Enables users to define the end point for commit logs. |
83
- | ** Pathspec Variable Adjustable by User** | Not Yet Implemented ❌ | Filters commits based on specified path patterns. |
84
- | ** Merge View Variable Adjustable by User** | Not Yet Implemented ❌ | Controls the inclusion of merge commits in views. |
85
- | ** Limit Variable Adjustable by User** | Not Yet Implemented ❌ | Sets the maximum number of commits to display. |
86
- | ** Log Options Variable Adjustable by User** | Not Yet Implemented ❌ | Customizes git log command options. |
87
- | ** Legacy Theme** | Not Yet Implemented ❌ | Restores the previous visual theme of the application. |
81
+ | ** Since Variable Adjustable by User** | Completed ✔️ | Allows users to set the starting point for commit logs. |
82
+ | ** Until Variable Adjustable by User** | Completed ✔️ | Enables users to define the end point for commit logs. |
83
+ | ** Pathspec Variable Adjustable by User** | Completed ✔️ | Filters commits based on specified path patterns. |
84
+ | ** Merge View Variable Adjustable by User** | Completed ✔️ | Controls the inclusion of merge commits in views. |
85
+ | ** Limit Variable Adjustable by User** | Completed ✔️ | Sets the maximum number of commits to display. |
86
+ | ** Log Options Variable Adjustable by User** | Completed ✔️ | Customizes git log command options. |
87
+ | ** Legacy Theme** | Completed ✔️ | Restores the previous visual theme of the application. |
88
88
| ** Linux Package Install** | Not Yet Implemented ❌ | Allows Linux users to install via a package manager. |
89
89
| ** macOS Package install** | Not Yet Implemented ❌ | Allows macOS users to install via brew. |
90
- | ** Docker Development Image** | Not Yet Implemented ❌ | Provides a Docker development image for CI/CD. |
90
+ | ** Docker Development Image** | Completed ✔️ | Provides a Docker development image for CI/CD. |
91
91
92
92
## Changes from Original
93
93
@@ -96,15 +96,16 @@ there may be instances where this version differs from the base project by desig
96
96
The following is a list of differences that this project will maintain compared to
97
97
the parent project:
98
98
99
- * Author, dates, and branch names can be passed via cmdline without interaction
99
+ - Author, dates, and branch names can be passed via cmdline without interaction
100
100
by the user. This means you can now do ` git-py-stats -L "John Doe" ` instead
101
101
of being prompted to enter the name after executing the non-interactive cmd.
102
- * CSV output is now saved to a file instead of printing out to the terminal.
102
+ - CSV output is now saved to a file instead of printing out to the terminal.
103
103
This file will be saved to wherever the process was executed. The name will
104
104
be ` git_daily_stats.csv `
105
- * JSON output is saved to a file wherever the process was executed instead of
105
+ - JSON output is saved to a file wherever the process was executed instead of
106
106
one that is provided by the user. The name will be ` git_log.json `
107
- * The New Contributors function shows the user's name next to the email in case
107
+ - JSON and CSV formatting has changed slightly from the original.
108
+ - The New Contributors function shows the user's name next to the email in case
108
109
no known mailmap has been implemented for that user.
109
110
110
111
## Requirements
@@ -216,6 +217,92 @@ For a full list of available options, run:
216
217
git-py-stats --help
217
218
```
218
219
220
+ ### Advanced Usage
221
+
222
+ It is possible for `git-py-stats` to read shell environment variables just like
223
+ `git-quick-stats` does. As it aims to maintain 1:1 compatibility, all of the
224
+ same arguments work the same as the parent project.
225
+
226
+ #### Git log since and until
227
+
228
+ You can set the variables `_GIT_SINCE` and/or `_GIT_UNTIL` before running
229
+ `git-py-stats` to limit the git log.
230
+ These work similar to git' s built-in ` --since` and ` --until` log options.
231
+
232
+ ` ` ` bash
233
+ export _GIT_SINCE=" 2017-01-20"
234
+ export _GIT_UNTIL=" 2017-01-22"
235
+ ` ` `
236
+
237
+ Once set, run ` git-py-stats` as normal. Note that this affects all stats that
238
+ parse the git log history until unset.
239
+
240
+ # ### Git log limit
241
+
242
+ You can set variable ` _GIT_LIMIT` for limited output.
243
+ It will affect the " changelogs" and " branch tree" options.
244
+ The default limit is ` 10` .
245
+
246
+ ` ` ` bash
247
+ export _GIT_LIMIT=20
248
+ ` ` `
249
+
250
+ # ### Git log options
251
+
252
+ You can set ` _GIT_LOG_OPTIONS` for
253
+ [git log options](https://git-scm.com/docs/git-log#_options):
254
+
255
+ ` ` ` bash
256
+ export _GIT_LOG_OPTIONS=" --ignore-all-space --ignore-blank-lines"
257
+ ` ` `
258
+
259
+ # ### Git pathspec
260
+
261
+ You can exclude a directory from the stats by using
262
+ [pathspec](https://git-scm.com/docs/gitglossary#gitglossary-aiddefpathspecapathspec)
263
+
264
+ ` ` ` bash
265
+ export _GIT_PATHSPEC=' :!directory'
266
+ ` ` `
267
+
268
+ You can also exclude files from the stats.
269
+ Note that it works with any alphanumeric, glob, or regex that git respects.
270
+
271
+ ` ` ` bash
272
+ export _GIT_PATHSPEC=' :!package-lock.json'
273
+ ` ` `
274
+
275
+ # ### Git merge view strategy
276
+
277
+ You can set the variable ` _GIT_MERGE_VIEW` to enable merge commits to be part
278
+ of the stats by setting ` _GIT_MERGE_VIEW` to ` enable` . You can also choose to
279
+ only show merge commits by setting ` _GIT_MERGE_VIEW` to ` exclusive` .
280
+ Default is to not show merge commits.
281
+ These work similar to git' s built-in `--merges` and `--no-merges` log options.
282
+
283
+ ```bash
284
+ export _GIT_MERGE_VIEW="enable"
285
+ export _GIT_MERGE_VIEW="exclusive"
286
+ ```
287
+
288
+ #### Git branch
289
+
290
+ You can set the variable `_GIT_BRANCH` to set the branch of the stats.
291
+ Works with commands `--git-stats-by-branch` and `--csv-output-by-branch`.
292
+
293
+ ```bash
294
+ export _GIT_BRANCH="master"
295
+ ```
296
+
297
+ #### Color themes
298
+
299
+ You can change to the legacy color scheme by toggling the variable
300
+ `_MENU_THEME` between `default` and `legacy`
301
+
302
+ ```bash
303
+ export _MENU_THEME="legacy"
304
+ ```
305
+
219
306
## Development
220
307
221
308
This section is currently under development and is changing rapidly as we work
0 commit comments