Blame


1 08ca3c53 2020-11-30 op # vc-got
2 08ca3c53 2020-11-30 op
3 2b7241ac 2021-02-14 op This is an 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 ------
7 08ca3c53 2020-11-30 op
8 08ca3c53 2020-11-30 op To start using it, you need to add `Got` to `vc-handled-backends` and
9 08ca3c53 2020-11-30 op make sure that `vc-got` is within your `load-path`. You shouldn't
10 08ca3c53 2020-11-30 op require the library.
11 08ca3c53 2020-11-30 op
12 08ca3c53 2020-11-30 op ```emacs-lisp
13 52a18138 2020-12-07 op (add-to-list 'vc-handled-backends 'Got)
14 08ca3c53 2020-11-30 op ```
15 08ca3c53 2020-11-30 op
16 d06f9880 2020-12-05 op It's highly recommended to add `".got"` to the list of
17 d06f9880 2020-12-05 op `vc-directory-exclusion-list`.
18 d06f9880 2020-12-05 op
19 d06f9880 2020-12-05 op ```emacs-lisp
20 52a18138 2020-12-07 op (add-to-list 'vc-directory-exclusion-list ".got")
21 d06f9880 2020-12-05 op ```
22 d06f9880 2020-12-05 op
23 08ca3c53 2020-11-30 op With `use-package` something like this should be enough:
24 08ca3c53 2020-11-30 op
25 08ca3c53 2020-11-30 op ```emacs-lisp
26 08ca3c53 2020-11-30 op (use-package vc-got
27 08ca3c53 2020-11-30 op :load-path "/path/to/vc-got/"
28 d06f9880 2020-12-05 op :defer t
29 d06f9880 2020-12-05 op :init
30 52a18138 2020-12-07 op (add-to-list 'vc-handled-backends 'Got)
31 52a18138 2020-12-07 op (add-to-list 'vc-directory-exclusion-list ".got"))
32 08ca3c53 2020-11-30 op ```
33 9e019413 2021-01-05 op
34 2b7241ac 2021-02-14 op ## Drawbacks
35 9e019413 2021-01-05 op
36 2b7241ac 2021-02-14 op While I've been using this backend on a daily basis for the last
37 2b7241ac 2021-02-14 op months, there are some rough edges. Fetching updates in particular is
38 2b7241ac 2021-02-14 op one action that *at the moment* is better to do by hand. Pushing,
39 2b7241ac 2021-02-14 op committing, blaming etc on the other hand are fully functional.
40 2b7241ac 2021-02-14 op
41 2b7241ac 2021-02-14 op
42 9e019413 2021-01-05 op ## Stage hunks
43 9e019413 2021-01-05 op
44 9e019413 2021-01-05 op Unlike other VC backends, `vc-got` is able to stage and commit
45 9e019413 2021-01-05 op individual changes. It's still WIP, but usable.
46 9e019413 2021-01-05 op
47 9e019413 2021-01-05 op - `vc-got-stage-files` guides the user through the stage process,
48 9e019413 2021-01-05 op like `got stage -p` (or `git add -p`). It operates on the current
49 9e019413 2021-01-05 op file or on the marked ones in `*vc-dir*`
50 9e019413 2021-01-05 op - `vc-got-stage-unstage` is similar, except that it un-stages the
51 9e019413 2021-01-05 op changes.
52 9e019413 2021-01-05 op - `vc-got-stage-diff` show the staged diff
53 9e019413 2021-01-05 op - `vc-got-stage-commit` commits the staged changes
54 9e019413 2021-01-05 op
55 9e019413 2021-01-05 op Here's an example of the `*vc-dir*` buffer when some edits were staged
56 9e019413 2021-01-05 op on a file
57 9e019413 2021-01-05 op
58 9e019413 2021-01-05 op ![vc-dir buffer with a staged file](images/vc-dir.png "vc-dir buffer with a staged file")
59 9e019413 2021-01-05 op
60 9e019413 2021-01-05 op and an example of the interactive stage operation with
61 9e019413 2021-01-05 op `vc-got-stage-files`
62 9e019413 2021-01-05 op
63 9e019413 2021-01-05 op ![interactive stage operation](images/vc-got-stage-files.png
64 9e019413 2021-01-05 op "interactive stage operation")
65 2b7241ac 2021-02-14 op
66 2b7241ac 2021-02-14 op
67 2b7241ac 2021-02-14 op ## Contributing
68 2b7241ac 2021-02-14 op
69 2b7241ac 2021-02-14 op The long-term plan is to get this into Emacs. This means that to
70 445e2bdd 2021-02-14 op avoid possible problems, a GNU copyright assignment is required. It's
71 2b7241ac 2021-02-14 op really easy to get one (just send an email), and having one will allow
72 2b7241ac 2021-02-14 op you to make further contribution to Emacs itself or to various
73 2b7241ac 2021-02-14 op other packages.