[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26066: 26.0.50; vc-git-status gives wrong result
From: |
Noam Postavsky |
Subject: |
bug#26066: 26.0.50; vc-git-status gives wrong result |
Date: |
Sun, 23 Apr 2017 18:28:04 -0400 |
> Subject: [PATCH] update vc-git
>
> ---
Could you add a meaningful commit message please? See CONTRIBUTE (under
"Commit messages") for details of Emacs' standard format.
I think the patch is basically okay now, just a few minor nitpicks below.
> +(defun vc-git--git-status-to-vc-state (code-list)
> + "Convert a list CODE-LIST of two-letter git status strings to a vc status.
This line is too long, I think it should be fine to shorten to just
"Convert CODE-LIST to a vc status". You explain the format of
CODE-LIST in the next paragraph anyway.
> +Each element of CODE-LIST comes from the first two characters of
> +a line returned by 'git status' and should be passed in the order given by
> 'git status'.
This paragraph looks unfilled, hit M-q on it.
> + ;; I have only seen this with a file that is only present in the
> + ;; index. Let us call this `removed'
Missing period.
> + (setq code-list
> + (mapcar (lambda (s)
> + (substring s 0 2))
> + (delete "" (split-string status "\0"))))
If you pass a non-nil OMIT-NULLS parameter to split-string, the
(delete ""...) should become unnecessary.
> + (vc-git--git-status-to-vc-state code-list))))
I would suggest dropping the temporary code-list variable here, and
just do
(vc-git--git-status-to-vc-state
(mapcar (lambda (s) (substring s 0 2))
(split-string status "\0" t)))
- bug#26066: 26.0.50; vc-git-status gives wrong result, (continued)
- bug#26066: 26.0.50; vc-git-status gives wrong result, Dmitry Gutov, 2017/04/10
- bug#26066: 26.0.50; vc-git-status gives wrong result, Jonathan Ganc, 2017/04/10
- bug#26066: 26.0.50; vc-git-status gives wrong result, Jonathan Ganc, 2017/04/11
- bug#26066: 26.0.50; vc-git-status gives wrong result, Dmitry Gutov, 2017/04/11
- bug#26066: 26.0.50; vc-git-status gives wrong result, Dmitry Gutov, 2017/04/11
- bug#26066: 26.0.50; vc-git-status gives wrong result, Jonathan Ganc, 2017/04/13
- bug#26066: 26.0.50; vc-git-status gives wrong result, Jonathan Ganc, 2017/04/23
- bug#26066: 26.0.50; vc-git-status gives wrong result,
Noam Postavsky <=
- bug#26066: 26.0.50; vc-git-status gives wrong result, Stefan Monnier, 2017/04/23
- bug#26066: 26.0.50; vc-git-status gives wrong result, Jonathan Ganc, 2017/04/23
- bug#26066: 26.0.50; vc-git-status gives wrong result, Andreas Schwab, 2017/04/24
- bug#26066: 26.0.50; vc-git-status gives wrong result, Jonathan Ganc, 2017/04/25
- bug#26066: 26.0.50; vc-git-status gives wrong result, Dmitry Gutov, 2017/04/25
- bug#26066: 26.0.50; vc-git-status gives wrong result, Jonathan Ganc, 2017/04/25
- bug#26066: 26.0.50; vc-git-status gives wrong result, Dmitry Gutov, 2017/04/30
- bug#26066: 26.0.50; vc-git-status gives wrong result, Dmitry Gutov, 2017/04/30