Blame


1 08ca3c53 2020-11-30 op # vc-got
2 08ca3c53 2020-11-30 op
3 08ca3c53 2020-11-30 op This is an **experimental** Emacs VC back-end for the [Game of
4 08ca3c53 2020-11-30 op Tree](http://gameoftrees.org/) version control system.
5 08ca3c53 2020-11-30 op
6 08ca3c53 2020-11-30 op Use it at your own risk.
7 08ca3c53 2020-11-30 op
8 08ca3c53 2020-11-30 op ------
9 08ca3c53 2020-11-30 op
10 08ca3c53 2020-11-30 op To start using it, you need to add `Got` to `vc-handled-backends` and
11 08ca3c53 2020-11-30 op make sure that `vc-got` is within your `load-path`. You shouldn't
12 08ca3c53 2020-11-30 op require the library.
13 08ca3c53 2020-11-30 op
14 08ca3c53 2020-11-30 op ```emacs-lisp
15 52a18138 2020-12-07 op (add-to-list 'vc-handled-backends 'Got)
16 08ca3c53 2020-11-30 op ```
17 08ca3c53 2020-11-30 op
18 d06f9880 2020-12-05 op It's highly recommended to add `".got"` to the list of
19 d06f9880 2020-12-05 op `vc-directory-exclusion-list`.
20 d06f9880 2020-12-05 op
21 d06f9880 2020-12-05 op ```emacs-lisp
22 52a18138 2020-12-07 op (add-to-list 'vc-directory-exclusion-list ".got")
23 d06f9880 2020-12-05 op ```
24 d06f9880 2020-12-05 op
25 08ca3c53 2020-11-30 op With `use-package` something like this should be enough:
26 08ca3c53 2020-11-30 op
27 08ca3c53 2020-11-30 op ```emacs-lisp
28 08ca3c53 2020-11-30 op (use-package vc-got
29 08ca3c53 2020-11-30 op :load-path "/path/to/vc-got/"
30 d06f9880 2020-12-05 op :defer t
31 d06f9880 2020-12-05 op :init
32 52a18138 2020-12-07 op (add-to-list 'vc-handled-backends 'Got)
33 52a18138 2020-12-07 op (add-to-list 'vc-directory-exclusion-list ".got"))
34 08ca3c53 2020-11-30 op ```
35 f2e1ddb3 2020-12-08 op
36 f2e1ddb3 2020-12-08 op ### vc-got-stage-mode
37 f2e1ddb3 2020-12-08 op
38 f2e1ddb3 2020-12-08 op `vc-got-stage-mode` is a minor mode to stage individual changes
39 f2e1ddb3 2020-12-08 op (currently you can't commit the staged changes).
40 f2e1ddb3 2020-12-08 op
41 f2e1ddb3 2020-12-08 op The Emacs VC system usually operates at a *fileset* level: i.e. it can
42 f2e1ddb3 2020-12-08 op commit/rollback/etc sets of file. Yet, sometimes you may want to
43 f2e1ddb3 2020-12-08 op commit only individual changes (eventually from multiple files), and
44 f2e1ddb3 2020-12-08 op VC doesn't support this. This is the motivation behind
45 f2e1ddb3 2020-12-08 op `vc-got-stage-mode`.
46 f2e1ddb3 2020-12-08 op
47 f2e1ddb3 2020-12-08 op The following keys are enabled by `vc-got-stage-mode`:
48 f2e1ddb3 2020-12-08 op
49 a5e9be3d 2020-12-08 op | key | description |
50 a5e9be3d 2020-12-08 op |--------------------|------------------------------------------------|
51 f2e1ddb3 2020-12-08 op | <kbd>C-c g A</kbd> | Applies (i.e. stage in got) the marked changes |
52 a5e9be3d 2020-12-08 op | <kbd>C-c g b</kbd> | Go to beginning of change |
53 a5e9be3d 2020-12-08 op | <kbd>C-c g e</kbd> | Go to end of change |
54 a5e9be3d 2020-12-08 op | <kbd>C-c g n</kbd> | Go to next change |
55 a5e9be3d 2020-12-08 op | <kbd>C-c g p</kbd> | Go to previous change |
56 a5e9be3d 2020-12-08 op | <kbd>C-c g t</kbd> | Toggle mark |
57 f2e1ddb3 2020-12-08 op
58 f2e1ddb3 2020-12-08 op A change is a set of sequential line added/removed by the diff, it is
59 f2e1ddb3 2020-12-08 op a smaller unit than a *hunk*.
60 f2e1ddb3 2020-12-08 op
61 f2e1ddb3 2020-12-08 op The staged changes are indicated by an arrow in the left fringe.