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
- Custom location via `--config` flag or `GIT_MIT_AUTHORS_CONFIG` environment variable
54
-
- Special handling for `$HOME/.config/git-mit/mit.toml` path - it's expanded to the actual home directory
55
-
- If the file doesn't exist, an empty string is used (no error)
56
-
57
-
3.**From Git config**:
58
-
- Authors stored in `mit.author.config.<initial>.*` entries
59
-
- These are set when you run `git mit-config mit set <initial> <name> <email>`
60
-
- Stored at repository level (local) or user level (global) based on `--scope`
61
-
62
-
The authors from these sources are **merged together**, with later sources overriding earlier ones if there are conflicts.
63
-
64
-
For more information on configuring authors, see the [authors documentation](mit.md).
65
-
66
83
### Extending Author Configuration Timeout
67
84
68
-
By default, author configuration expires after 60 minutes, requiring you to run `git mit <initials>` again. If you find this timeout too short, you can extend it.
69
-
70
-
#### How the Timeout Works
71
-
72
-
- The timeout is stored as a Unix timestamp in `mit.author.expires`
73
-
- When you run `git mit <initials>`, it sets the expiration to current time + timeout duration (in minutes)
74
-
- The `pre-commit` hook checks if the current time is past this expiration
75
-
- If expired, you'll see an error with the expiration time and need to run `git mit` again
76
-
77
-
Note: Setting very long timeouts reduces the benefit of the expiration feature, which ensures commit attribution stays current when developers change throughout the day.
78
-
79
-
#### Setting a Longer Timeout
85
+
By default, author configuration expires after 60 minutes. If you find this timeout too short, you can extend it:
80
86
81
87
1.**Using command-line flag**:
82
88
```bash,skip()
@@ -127,15 +133,6 @@ If co-authors aren't being added to commits or commit message validation isn't w
127
133
```
128
134
Look for `x` in the permissions (e.g., `-rwxr-xr-x`)
129
135
130
-
### Hook Installation Details
131
-
132
-
The installation process creates symbolic links to the git-mit binaries:
133
-
134
-
-**Windows**: Creates file symbolic links with `.exe` extension
135
-
-**Unix/Linux/macOS**: Creates standard symbolic links
136
-
-**Existing hooks**: Installation will fail if hooks already exist (unless they're already symlinks to git-mit)
137
-
-**Symlink validation**: If a symlink exists but points to the correct binary, installation succeeds silently
138
-
139
136
### Reinstall Hooks
140
137
141
138
If hooks are missing or not working:
@@ -177,27 +174,6 @@ See the [installation documentation](binaries/git-mit-install.md) for more detai
177
174
178
175
If lints aren't being applied as expected:
179
176
180
-
### Understanding Lint Configuration Precedence
181
-
182
-
Lints are loaded from multiple sources with TOML files taking precedence:
3. System config (`/etc/gitconfig`) - lowest priority
292
272
293
-
### How git-mit Discovers git Configuration
294
-
295
-
The configuration discovery process:
273
+
#### Lint Configuration Precedence
296
274
297
-
1.**Repository discovery**: Uses `Repository::discover()` to find the Git repository
298
-
2.**Config loading**: Opens the repository's config or falls back to [default config](https://libgit2.org/docs/reference/v0.22.1/config/git_config_open_default.html)
299
-
3.**Author loading**: Reads from `mit.author.config.*` entries in Git config
300
-
4.**Lint settings**: Reads from `mit.lint.*` entries and `.git-mit.toml` files
301
-
5.**TOML file discovery**: Looks for `.git-mit.toml` first, then `.git-mit.toml.dist` in repository root
275
+
Lints are loaded from multiple sources with TOML files taking precedence:
0 commit comments