Re: [PATCH 1/4] git.el: Support for showing unknown/ignored directories.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Karl Hasselström <kha@xxxxxxxxxxx> writes:

> On 2008-02-07 13:50:19 +0100, Alexandre Julliard wrote:
>
>> Instead of recursing into directories that only contain unknown
>> files, display only the directory itself. Its contents can be
>> expanded with git-find-file (bound to C-m).
>
> I have a bunch of directories in my tree with only ignored files in
> them. They used to not show up at all, but now they do. If I press
> return with the cursor on top of one of them, it vanishes (which is
> equivalent to expanding to all the 0 non-ignored files in that
> directory, I guess).
>
> I presume this wasn't the intended behavior? I like the idea for
> subdirectories that actually contain non-ignored files, but
> directories with only ignored files should really not be shown at all.

It probably needs something like this:

>From b32a397a64eec64d433aa0ee00147003723cfeee Mon Sep 17 00:00:00 2001
From: Alexandre Julliard <julliard@xxxxxxxxxx>
Date: Fri, 22 Feb 2008 16:48:53 +0100
Subject: [PATCH] git.el: Do not display empty directories.

Signed-off-by: Alexandre Julliard <julliard@xxxxxxxxxx>
---
 contrib/emacs/git.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index d91fbb8..7cb86df 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -753,7 +753,7 @@ Return the list of files that haven't been handled."
 (defun git-run-ls-files-with-excludes (status files default-state &rest options)
   "Run git-ls-files on FILES with appropriate --exclude-from options."
   (let ((exclude-files (git-get-exclude-files)))
-    (apply #'git-run-ls-files status files default-state "--directory"
+    (apply #'git-run-ls-files status files default-state "--directory" "--no-empty-directory"
            (concat "--exclude-per-directory=" git-per-dir-ignore-file)
            (append options (mapcar (lambda (f) (concat "--exclude-from=" f)) exclude-files)))))
 
-- 
1.5.4.1.132.gd85f75

-- 
Alexandre Julliard
julliard@xxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux