[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/add-vdiff 9b3ffb0 150/258: Don't distiguish exit code 0 f
From: |
Justin Burkett |
Subject: |
[elpa] scratch/add-vdiff 9b3ffb0 150/258: Don't distiguish exit code 0 from 1 |
Date: |
Wed, 17 May 2017 08:13:41 -0400 (EDT) |
branch: scratch/add-vdiff
commit 9b3ffb01ac141a528968497f60b2e18b35147374
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
Don't distiguish exit code 0 from 1
The manual says 1 indicates changes but I'm sometimes getting 0 from
diff3 when there are changes
---
vdiff.el | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/vdiff.el b/vdiff.el
index 6327cd3..697d765 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -495,22 +495,22 @@ because those are handled differently.")
"This is the sentinel for `vdiff-refresh'. It does the job of
parsing the diff output and triggering the overlay updates."
(unless vdiff--inhibit-diff-update
- (let ((parse-func (if vdiff--3way
+ (let ((parse-func (if (process-get proc 'vdiff-3way)
'vdiff--parse-diff3
'vdiff--parse-diff))
finished)
- (cond ((string= "finished\n" event)
- ;; means no difference between files
- (setq vdiff--diff-data nil)
- (setq finished t))
- ((string= "exited abnormally with code 1\n" event)
- (setq vdiff--diff-data
- (funcall parse-func (process-buffer proc)))
- (setq finished t))
- ((string-match-p "exited abnormally with code" event)
- (setq vdiff--diff-data nil)
- (setq finished t)
- (message "vdiff process error: %s" event)))
+ (cond
+ ;; Was getting different exit code conventions depending on the
+ ;; version of diff used
+ ((or (string= "finished\n" event)
+ (string= "exited abnormally with code 1\n" event))
+ (setq vdiff--diff-data
+ (funcall parse-func (process-buffer proc)))
+ (setq finished t))
+ ((string-match-p "exited abnormally with code" event)
+ (setq vdiff--diff-data nil)
+ (setq finished t)
+ (message "vdiff process error: %s" event)))
(when finished
(vdiff--refresh-overlays)
(vdiff--refresh-line-maps)
- [elpa] scratch/add-vdiff 679617c 199/258: Force update of window-start on manual scroll-function, (continued)
- [elpa] scratch/add-vdiff 679617c 199/258: Force update of window-start on manual scroll-function, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff dcf811e 188/258: Add new on-quit options, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff c82f2b5 090/258: Add docs on refinements, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 3fcf4b9 101/258: Fix sign problem in adding hunk overlays, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 9346e46 106/258: Simplify method for setting vscroll, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff c46b76b 111/258: Set window point on scroll, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff fd8c973 109/258: Remove post-command-hook, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 25a7516 128/258: Only run scroll-function once per command, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 25ec344 134/258: Require diff-mode so that diff-mode faces are available, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 371febc 135/258: Add option to automatically refine hunks, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 9b3ffb0 150/258: Don't distiguish exit code 0 from 1,
Justin Burkett <=
- [elpa] scratch/add-vdiff d33845c 167/258: Minor change in cleanup, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff edfae89 176/258: Cleanup vdiff-buffers, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 85a4d4e 087/258: Fix point jumping after sending changes, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff f041c58 102/258: Sync lines after sending changes, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 88ce867 088/258: Initial attempt at refine commands, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff f3ca6cb 110/258: Tweak vscroll function, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 84380fb 113/258: Delete unused lexical vars, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 40351c6 079/258: Exit hydra on vdiff exit, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 4bb84e4 073/258: Add update command to hydra, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 81478be 117/258: Lock diff data for certain operations, Justin Burkett, 2017/05/17