[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-got 9e01941 078/145: improve vc-dir presentation & d
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-got 9e01941 078/145: improve vc-dir presentation & document vc-got-stage in README |
Date: |
Thu, 9 Sep 2021 15:58:37 -0400 (EDT) |
branch: externals/vc-got
commit 9e0194139b3ace5c3cf3802cc38230ae9e9f38f1
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>
improve vc-dir presentation & document vc-got-stage in README
---
README.md | 27 +++++++++++++++++++++++++--
images/vc-dir.png | Bin 0 -> 35724 bytes
images/vc-got-stage-files.png | Bin 0 -> 59967 bytes
vc-got.el | 20 ++++++++++----------
4 files changed, 35 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index d872ab2..9fddaad 100644
--- a/README.md
+++ b/README.md
@@ -3,8 +3,6 @@
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
@@ -32,3 +30,28 @@ With `use-package` something like this should be enough:
(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")
diff --git a/images/vc-dir.png b/images/vc-dir.png
new file mode 100644
index 0000000..8754124
Binary files /dev/null and b/images/vc-dir.png differ
diff --git a/images/vc-got-stage-files.png b/images/vc-got-stage-files.png
new file mode 100644
index 0000000..826c716
Binary files /dev/null and b/images/vc-got-stage-files.png differ
diff --git a/vc-got.el b/vc-got.el
index 3133c9f..50e516d 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -443,7 +443,15 @@ FILES is nil, consider all the files in DIR."
(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)
@@ -453,14 +461,6 @@ FILES is nil, consider all the files in DIR."
'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)
'face
(if isdir 'font-lock-comment-delimiter-face
'font-lock-function-name-face)
@@ -750,7 +750,7 @@ Adviced around vc-dir-move-to-goal-column because it
hardcodes column 25."
(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)
- [elpa] externals/vc-got 2552a6c 104/145: mark find-ignore-file as done and move it to the right place, (continued)
- [elpa] externals/vc-got 2552a6c 104/145: mark find-ignore-file as done and move it to the right place, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 26b39de 135/145: remove debug macroexpand, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 84beb0d 129/145: add docstring for vc-got-update-on-retrieve-tag, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got a1839dc 131/145: don't include the common commit in log-outgoing, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 74b0000 138/145: install a custom process filter for `got send', ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 3efc759 141/145: cleanup, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got f457868 024/145: typo, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 06d4d37 031/145: add Makefile, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got ddc59a0 057/145: remove extra parens from vc-got-unregister and fix pcase matchall, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got f8a9db5 060/145: fix vc-got-repository-url for checkout of non-bare repos, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 9e01941 078/145: improve vc-dir presentation & document vc-got-stage in README,
ELPA Syncer <=
- [elpa] externals/vc-got a7777ea 079/145: list also staged addition/removals, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 668dc8e 068/145: vc-got--status: handle stage info and filter result, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 7a5ead6 061/145: vc-got-repository-url: avoid infinite loops in parsing, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 0d57aba 072/145: remove the separator when showing a chunk to stage, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got d346ca6 084/145: ignore ignored files, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 67e0b4d 096/145: add note for the future, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 6ab1c7b 102/145: implement the tag creation part of vc-got-create-tag, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 887e069 090/145: make files an optional parameter, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 7726b6c 097/145: silence some checkdoc warnings, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got f701269 118/145: require log-edit to avoid a warning, ELPA Syncer, 2021/09/09