-
Notifications
You must be signed in to change notification settings - Fork 6
/
Readme
43 lines (32 loc) · 1.99 KB
/
Readme
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
42
43
git-infos
Using git informations in LaTeX documents
Manuel Pégourié-Gonnard
This an early version of the git-info LaTeX package, not yet suitable for
distribution on the CTAN, but maybe still usable. However, be warned that
everything may change without warning until the package is published on CTAN.
Currently, there is only one feature and no documentation besides this readme
and the example files.
The feature is, if you load git-info in a document lying in a git repository,
the package defines a few macros containing information about the current HEAD:
- hash, committer and date of the last commit,
- current branch.
See the example and test files for the full list of macros available.
The package has two options, only one of which is used atm: 'maxdepth=N', whose
default value is 8. It is the maximum allowed depth (in terms of directory
level) of the current directory relative to the root of the git repo. Make it
bigger than if 8 is not enough for you and git-info fails with a error like
"this is not a git repository".
Git-info works by parsing some plain-text files in the git repository in pure
TeX. There is currently some restrictions : eg, the current HEAD must be a branch,
not detached; and probably other restrictions I am not aware of, due to my poor
knowledge of git (internals).
Plans for the future are to allow access to the same information (except the
branch) individually for each file, à la svn-multi. With current TeX, it can
probably not be done in TeX macros, since access to a few compressed files is
needed. So a helper script will be provided, intended to be run by the
post-commit hook, writing the necessary information to a plain text file.
Other plans for the future also include more testing, some customisation options,
and a proper documentation, of course.
Feel free to test the package, report features and suggest new bugs ;-)
Happy TeXing!