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
This tool will let you use [git attributes](https://git-scm.com/docs/gitattributes) in Emacs buffers.
4
+
5
+
In example the following will get the value of a `foo` git attribute for the file associated with the current buffer:
6
+
7
+
```elisp
8
+
(git-attr-get "foo")
9
+
```
10
+
11
+
The `git-attr-get` function will return
12
+
13
+
*`t` for git attributes with the value "set"
14
+
*`nil` for git attributes with the value "unset"
15
+
*`'undecided` for git attributes that are "unspecified"
16
+
* and the value itself if the git attribute is set to a value
17
+
18
+
## git-attr-linguist
19
+
20
+
The `git-attr-linguist` library adds some functions for the git attributes [`linguist-generated`](https://github.com/github/linguist#generated-code) and [`linguist-vendored`](https://github.com/github/linguist#vendored-code).
21
+
22
+
It adds a `find-file-hook` and upon visiting a file puts the buffer into `git-attr-linguist-generated-mode` and/or `git-attr-linguist-vendored-mode` minor modes.
23
+
24
+
Both minor modes just puts the buffer into `read-only-mode`.
0 commit comments