mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
vc-git-project-list-files: Restore support for Git < 2.13
* lisp/progmodes/project.el (vc-git-project-list-files): Restore support for Git < 2.13 (discussed in bug#79809).
This commit is contained in:
parent
7425e33287
commit
821c0d36df
1 changed files with 25 additions and 24 deletions
|
|
@ -722,30 +722,31 @@ See `project-vc-extra-root-markers' for the marker value format.")
|
|||
(and include-untracked '("-o"))))
|
||||
(when extra-ignores
|
||||
(setq args (append args
|
||||
(cons "--"
|
||||
(mapcar
|
||||
(lambda (i)
|
||||
(format
|
||||
":(exclude,glob,top)%s"
|
||||
(if (string-match "\\*\\*" i)
|
||||
;; Looks like pathspec glob
|
||||
;; format already.
|
||||
i
|
||||
(if (string-match "\\./" i)
|
||||
;; ./abc -> abc
|
||||
(setq i (substring i 2))
|
||||
;; abc -> **/abc
|
||||
(setq i (concat "**/" i))
|
||||
;; FIXME: '**/abc' should also
|
||||
;; match a directory with that
|
||||
;; name, but doesn't (git 2.25.1).
|
||||
;; Maybe we should replace
|
||||
;; such entries with two.
|
||||
(if (string-match "/\\'" i)
|
||||
;; abc/ -> abc/**
|
||||
(setq i (concat i "**"))))
|
||||
i)))
|
||||
extra-ignores)))))
|
||||
;; Git <2.13 needs a positive pathspec first.
|
||||
'("--" ".")
|
||||
(mapcar
|
||||
(lambda (i)
|
||||
(format
|
||||
":(exclude,glob,top)%s"
|
||||
(if (string-match "\\*\\*" i)
|
||||
;; Looks like pathspec glob
|
||||
;; format already.
|
||||
i
|
||||
(if (string-match "\\./" i)
|
||||
;; ./abc -> abc
|
||||
(setq i (substring i 2))
|
||||
;; abc -> **/abc
|
||||
(setq i (concat "**/" i))
|
||||
;; FIXME: '**/abc' should also
|
||||
;; match a directory with that
|
||||
;; name, but doesn't (git 2.25.1).
|
||||
;; Maybe we should replace
|
||||
;; such entries with two.
|
||||
(if (string-match "/\\'" i)
|
||||
;; abc/ -> abc/**
|
||||
(setq i (concat i "**"))))
|
||||
i)))
|
||||
extra-ignores))))
|
||||
(setq files
|
||||
(delq nil
|
||||
(mapcar
|
||||
|
|
|
|||
Loading…
Reference in a new issue