Skip to content

Commit 44b160a

Browse files
committed
Merge branch 'master' into reference-revision-highlights
2 parents 55b77d7 + ed47dc1 commit 44b160a

File tree

5 files changed

+46
-6
lines changed

5 files changed

+46
-6
lines changed

.github/workflows/ci.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.el'
7+
- '**ci.yml'
8+
- 'Makefile'
9+
branches:
10+
- master
11+
12+
pull_request:
13+
paths:
14+
- '**.el'
15+
- '**ci.yml'
16+
- 'Makefile'
17+
branches:
18+
- master
19+
20+
jobs:
21+
check:
22+
runs-on: ubuntu-latest
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
emacs_version: [26.1, 26.3, 27.2, 28.2, 29.4, snapshot]
28+
29+
steps:
30+
- name: Setup Emacs
31+
uses: purcell/setup-emacs@master
32+
with:
33+
version: ${{ matrix.emacs_version }}
34+
35+
- name: Checkout Code
36+
uses: actions/checkout@v3
37+
38+
- name: Run tests
39+
run: make test

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RM ?= rm -f
1515
all: compile test
1616

1717
test:
18-
$(EMACS) -batch -L . -l test/diff-hl-test.el -f diff-hl-run-tests
18+
$(EMACS) -batch -L . -l test/diff-hl-test.el -f ert-run-tests-batch-and-exit
1919

2020
compile:
2121
$(EMACS) -batch -L . -f batch-byte-compile $(SOURCES)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
About
1+
About [![Build Status](https://github.com/dgutov/diff-hl/actions/workflows/ci.yml/badge.svg)](https://github.com/dgutov/diff-hl/actions/workflows/ci.yml)
22
=====
33

44
`diff-hl-mode` highlights uncommitted changes on the side of the window (area

diff-hl.el

+4-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,10 @@ contents as they are (or would be) after applying the changes in NEW."
551551
default-directory)))
552552
;; TODO: debounce if a thread is already running.
553553
(let ((buf (current-buffer))
554-
(temp-buffer (generate-new-buffer " *temp*" t)))
554+
(temp-buffer
555+
(if (< emacs-major-version 28)
556+
(generate-new-buffer " *temp*")
557+
(generate-new-buffer " *temp*" t))))
555558
;; Switch buffer temporarily, to "unlock" it for other threads.
556559
(with-current-buffer temp-buffer
557560
(make-thread

test/diff-hl-test.el

+1-3
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
(should-error (diff-hl-next-hunk) :type 'user-error)))
128128

129129
(diff-hl-deftest diff-hl-indirect-buffer-move-async ()
130+
(skip-unless (>= emacs-major-version 27)) ;No `main-thread'.
130131
(diff-hl-test-in-source
131132
(let ((diff-hl-update-async t))
132133
(narrow-to-region (point-min) (point-max))
@@ -215,9 +216,6 @@
215216
216217
"))))))
217218

218-
(defun diff-hl-run-tests ()
219-
(ert-run-tests-batch))
220-
221219
(provide 'diff-hl-test)
222220

223221
;;; diff-hl-test.el ends here

0 commit comments

Comments
 (0)