diff options
| author | Dmitry Gutov | 2025-12-19 02:26:59 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2025-12-19 02:26:59 +0200 |
| commit | de5b8c70fbc2c33a1ea980ae5ab2bdbacd480671 (patch) | |
| tree | a7a8cad5d75ec66a9e546a0e69eaaf964a61cb07 | |
| parent | 75a1403ff3e006e4b0fc71b2da3f3c48a70da766 (diff) | |
| download | emacs-de5b8c70fbc2c33a1ea980ae5ab2bdbacd480671.tar.gz emacs-de5b8c70fbc2c33a1ea980ae5ab2bdbacd480671.zip | |
Revert "vc-git-project-list-files: Restore support for Git < 2.13"
This reverts commit 821c0d36dfa2f2cddb9d05a024a8248f2390f478.
Despite re-enacting what the modern Git versions seem to do under the
covers, the effect is not the same: filtering works differently.
| -rw-r--r-- | lisp/progmodes/project.el | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 03d74a353e2..50287035833 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -723,31 +723,30 @@ See `project-vc-extra-root-markers' for the marker value format.") | |||
| 723 | (and include-untracked '("-o")))) | 723 | (and include-untracked '("-o")))) |
| 724 | (when extra-ignores | 724 | (when extra-ignores |
| 725 | (setq args (append args | 725 | (setq args (append args |
| 726 | ;; Git <2.13 needs a positive pathspec first. | 726 | (cons "--" |
| 727 | '("--" ".") | 727 | (mapcar |
| 728 | (mapcar | 728 | (lambda (i) |
| 729 | (lambda (i) | 729 | (format |
| 730 | (format | 730 | ":(exclude,glob,top)%s" |
| 731 | ":(exclude,glob,top)%s" | 731 | (if (string-match "\\*\\*" i) |
| 732 | (if (string-match "\\*\\*" i) | 732 | ;; Looks like pathspec glob |
| 733 | ;; Looks like pathspec glob | 733 | ;; format already. |
| 734 | ;; format already. | 734 | i |
| 735 | i | 735 | (if (string-match "\\./" i) |
| 736 | (if (string-match "\\./" i) | 736 | ;; ./abc -> abc |
| 737 | ;; ./abc -> abc | 737 | (setq i (substring i 2)) |
| 738 | (setq i (substring i 2)) | 738 | ;; abc -> **/abc |
| 739 | ;; abc -> **/abc | 739 | (setq i (concat "**/" i)) |
| 740 | (setq i (concat "**/" i)) | 740 | ;; FIXME: '**/abc' should also |
| 741 | ;; FIXME: '**/abc' should also | 741 | ;; match a directory with that |
| 742 | ;; match a directory with that | 742 | ;; name, but doesn't (git 2.25.1). |
| 743 | ;; name, but doesn't (git 2.25.1). | 743 | ;; Maybe we should replace |
| 744 | ;; Maybe we should replace | 744 | ;; such entries with two. |
| 745 | ;; such entries with two. | 745 | (if (string-match "/\\'" i) |
| 746 | (if (string-match "/\\'" i) | 746 | ;; abc/ -> abc/** |
| 747 | ;; abc/ -> abc/** | 747 | (setq i (concat i "**")))) |
| 748 | (setq i (concat i "**")))) | 748 | i))) |
| 749 | i))) | 749 | extra-ignores))))) |
| 750 | extra-ignores)))) | ||
| 751 | (setq files | 750 | (setq files |
| 752 | (delq nil | 751 | (delq nil |
| 753 | (mapcar | 752 | (mapcar |