commit - c819459405eb9febdb67b19d08bfa50c5ec83017
commit + 9e0194139b3ace5c3cf3802cc38230ae9e9f38f1
blob - d872ab2cc1eb30f16053257239bb042dee72517a
blob + 9fddaadadcb564ce1e5273cf28673e9fb4b3c98a
--- README.md
+++ README.md
This is an **experimental** Emacs VC back-end for the [Game of
Tree](http://gameoftrees.org/) version control system.
-Use it at your own risk.
-
------
To start using it, you need to add `Got` to `vc-handled-backends` and
(add-to-list 'vc-handled-backends 'Got)
(add-to-list 'vc-directory-exclusion-list ".got"))
```
+
+
+## Stage hunks
+
+Unlike other VC backends, `vc-got` is able to stage and commit
+individual changes. It's still WIP, but usable.
+
+ - `vc-got-stage-files` guides the user through the stage process,
+ like `got stage -p` (or `git add -p`). It operates on the current
+ file or on the marked ones in `*vc-dir*`
+ - `vc-got-stage-unstage` is similar, except that it un-stages the
+ changes.
+ - `vc-got-stage-diff` show the staged diff
+ - `vc-got-stage-commit` commits the staged changes
+
+Here's an example of the `*vc-dir*` buffer when some edits were staged
+on a file
+
+![vc-dir buffer with a staged file](images/vc-dir.png "vc-dir buffer with a staged file")
+
+and an example of the interactive stage operation with
+`vc-got-stage-files`
+
+![interactive stage operation](images/vc-got-stage-files.png
+"interactive stage operation")
blob - /dev/null
blob + 875412491f29d17937da9da4bc9a2906d8e78cc3 (mode 644)
Binary files /dev/null and images/vc-dir.png differ
blob - /dev/null
blob + 826c7163c2e969139666c96a95d3e7cc54c7fd27 (mode 644)
Binary files /dev/null and images/vc-got-stage-files.png differ
blob - 3133c9fcbad226020009184ecc05e15f405be627
blob + 50e516dd2ecf251a2eeb8382fed0044a813f4a31
--- vc-got.el
+++ vc-got.el
(propertize
(format "%c" (if (vc-dir-fileinfo->marked info) ?* ? ))
'face 'font-lock-type-face)
- " "
+ " "
+ (propertize
+ (if stage-state
+ (format "staged:%-6s" stage-state)
+ (format "%-13s" ""))
+ 'face (cond ((memq stage-state '(add edit)) 'font-lock-constant-face)
+ ((eq stage-state 'remove) 'font-lock-warning-face)
+ (t 'font-lock-variable-name-face)))
+ " "
(propertize
(format "%-14s" state)
'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face)
((eq state 'edited) 'font-lock-constant-face)
(t 'font-lock-variable-name-face))
'mouse-face 'highlight)
- " "
- (propertize
- (if stage-state
- (format "staged:%-7s" stage-state)
- (format "%-14s" ""))
- 'face (cond ((memq stage-state '(add edit)) 'font-lock-constant-face)
- ((eq stage-state 'remove) 'font-lock-warning-face)
- (t 'font-lock-variable-name-face)))
" "
(propertize
(format "%s" filename)
(funcall fn)
(beginning-of-line)
(unless (eolp)
- (forward-char 34))))
+ (forward-char 31))))
(advice-add 'vc-dir-move-to-goal-column :around #'vc-got-fix-dir-move-to-goal-column)
(provide 'vc-got)