Skip to contentSkip to conversation

.git directory should be ignored

PATCH In review Xavier Maillard 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/7 .git directory should be ignored

Add .git to the list of extensions to be ignored

---
 contrib/emacs/vc-git.el |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
contrib/emacs/vc-git.el +3 -0
index a2d3932..3d43ca0 100644
@@ -149,4 +149,7 @@
 ;;    (and (looking-at "[0-9a-f]+")
 ;;         (buffer-substring (match-beginning 0) (match-end 0)))))
 
+;;;###autoload
+(add-to-list 'completion-ignored-extensions ".git/")
+
 (provide 'vc-git)
Signature · 1 line
1.5.0
#1 lore raw
Quoted 12 lines · Xavier Maillard

Add .git to the list of extensions to be ignored

---
 contrib/emacs/vc-git.el |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
contrib/emacs/vc-git.el +0 -0
index a2d3932..3d43ca0 100644

contrib/emacs/vc-git.el line 155

Quoted 7 lines
contrib/emacs/vc-git.el +3 -0
@@ -149,4 +149,7 @@
 ;;    (and (looking-at "[0-9a-f]+")
 ;;         (buffer-substring (match-beginning 0) (match-end 0)))))
 
+;;;###autoload
+(add-to-list 'completion-ignored-extensions ".git/")
+
 (provide 'vc-git)

I am no Emacs vc expert to judge, but I wonder if it is kosher to muck with that global variable from a vc backend.

The above does mirror what pcl-cvs does for "CVS/" but I notice that vc-cvs.el does not do so, neither vc-rcs.el excludes "RCS/".

#2 lore raw

From: Junio C Hamano <[email protected]>

Quoted 1 line · Xavier Maillard

Add .git to the list of extensions to be ignored

The above does mirror what pcl-cvs does for "CVS/" but I notice that vc-cvs.el does not do so, neither vc-rcs.el excludes "RCS/".

Oops wrong file /o\. Iintended to do this into git.el... Please ignore. Iwill double-check my future contributions before sending it here.

Sorry

Signature · 1 line
Xavier
#3 lore raw
In reply to Junio C Hamano
Quoted 6 lines · Junio C Hamano

I am no Emacs vc expert to judge, but I wonder if it is kosher to muck with that global variable from a vc backend.

The above does mirror what pcl-cvs does for "CVS/" but I notice that vc-cvs.el does not do so, neither vc-rcs.el excludes "RCS/".

Yes, I think if we really want to do this, it should be done in git.el, not in vc-git.

Signature · 2 lines
Alexandre Julliard
[email protected]