[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2209370 27/42: Ensure working revisions are never stale
From: |
Dmitry Gutov |
Subject: |
[elpa] master 2209370 27/42: Ensure working revisions are never stale |
Date: |
Wed, 09 Sep 2015 19:03:41 +0000 |
branch: master
commit 2209370e6bfd0471f07d5198589102b3dbfe85a7
Author: PythonNut <address@hidden>
Commit: PythonNut <address@hidden>
Ensure working revisions are never stale
---
diff-hl-flydiff.el | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/diff-hl-flydiff.el b/diff-hl-flydiff.el
index c065831..04bf1b9 100644
--- a/diff-hl-flydiff.el
+++ b/diff-hl-flydiff.el
@@ -66,6 +66,11 @@
(advice-add 'vc-git-mode-line-string :override
#'diff-hl-flydiff/vc-git-mode-line-string)))
+(defun diff-hl-flydiff/working-revision (file)
+ "Like vc-working-revision, but always up-to-date"
+ (vc-file-setprop file 'vc-working-revision
+ (vc-call-backend (vc-backend file) 'working-revision file)))
+
(defun diff-hl-flydiff-make-temp-file-name (file rev &optional manual)
"Return a backup file name for REV or the current version of FILE.
If MANUAL is non-nil it means that a name for backups created by
@@ -114,14 +119,11 @@ This requires the external program `diff' to be in your
`exec-path'."
(if (file-directory-p "/dev/shm/")
"/dev/shm/"
temporary-file-directory))
- (rev (diff-hl-flydiff-create-revision
- file
- (vc-working-revision file
- (vc-responsible-backend file)))))
+ (rev (diff-hl-flydiff-create-revision file
+ (diff-hl-flydiff/working-revision file))))
(diff-no-select rev (current-buffer) "-U 0" 'noasync
(get-buffer-create " *diff-hl-diff*")))))
-
(defun diff-hl-flydiff/update (old-fun &optional auto)
(unless (and auto
(or
- [elpa] master 3e64ed5 22/42: #'diff-hl-flydiff/overlay-modified → #'ignored, (continued)
- [elpa] master 3e64ed5 22/42: #'diff-hl-flydiff/overlay-modified → #'ignored, Dmitry Gutov, 2015/09/09
- [elpa] master e0f8fe1 23/42: Require nadvice at toplevel, Dmitry Gutov, 2015/09/09
- [elpa] master 34d2802 24/42: No need to remove diff-hl-edit from hooks, Dmitry Gutov, 2015/09/09
- [elpa] master 45ac71d 18/42: Revert "Allow diffing on-the-fly", Dmitry Gutov, 2015/09/09
- [elpa] master 66e521a 19/42: Add diff-hl-flydiff as a separate file, Dmitry Gutov, 2015/09/09
- [elpa] master 4bd5166 28/42: Update copyright year(s) for diff-hl-flydiff, Dmitry Gutov, 2015/09/09
- [elpa] master 3fa2b54 25/42: Prefer using /dev/shm for temporary files, Dmitry Gutov, 2015/09/09
- [elpa] master 3ab3aae 29/42: Fix *another* usage of "ignored", Dmitry Gutov, 2015/09/09
- [elpa] master 2992efd 31/42: Simplify diff-hl-flydiff/modified-p advice, Dmitry Gutov, 2015/09/09
- [elpa] master 6ab3ebe 30/42: Stop duplicating code in diff-hl-changes, Dmitry Gutov, 2015/09/09
- [elpa] master 2209370 27/42: Ensure working revisions are never stale,
Dmitry Gutov <=
- [elpa] master 15aa2b8 26/42: Fix usage of "ignored", Dmitry Gutov, 2015/09/09
- [elpa] master 2d40373 34/42: Update diff-hl-flydiff/vc-git-mode-line-string as per Emacs master, Dmitry Gutov, 2015/09/09
- [elpa] master a16b225 38/42: One fewer version check, Dmitry Gutov, 2015/09/09
- [elpa] master f300548 33/42: Merge pull request #50 from PythonNut/master, Dmitry Gutov, 2015/09/09
- [elpa] master 7428f4a 37/42: Reduce warnings during byte-compilation; don't error b-c in <24.4, Dmitry Gutov, 2015/09/09
- [elpa] master 418dbc7 32/42: Update docs to reflect new diff-hl-flydiff-mode, Dmitry Gutov, 2015/09/09
- [elpa] master 1558064 35/42: Reword the recent README changes, Dmitry Gutov, 2015/09/09
- [elpa] master 8d313db 36/42: Use --strip-trailing-cr, Dmitry Gutov, 2015/09/09
- [elpa] master 5068da4 39/42: Reindent, Dmitry Gutov, 2015/09/09
- [elpa] master 7fa7f09 41/42: Bump the version, Dmitry Gutov, 2015/09/09