git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Julliard <julliard@winehq.org>
To: "Karl Hasselström" <kha@treskal.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/4] git.el: Support for showing unknown/ignored directories.
Date: Fri, 22 Feb 2008 16:53:16 +0100	[thread overview]
Message-ID: <8763whkmxf.fsf@wine.dyndns.org> (raw)
In-Reply-To: <20080222153051.GA20984@diana.vm.bytemark.co.uk> ("Karl Hasselström"'s message of "Fri, 22 Feb 2008 16:30:51 +0100")

Karl Hasselström <kha@treskal.com> 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@winehq.org>
Date: Fri, 22 Feb 2008 16:48:53 +0100
Subject: [PATCH] git.el: Do not display empty directories.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 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@winehq.org

  reply	other threads:[~2008-02-22 15:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07 12:50 [PATCH 1/4] git.el: Support for showing unknown/ignored directories Alexandre Julliard
2008-02-22 15:30 ` Karl Hasselström
2008-02-22 15:53   ` Alexandre Julliard [this message]
2008-02-22 17:10     ` Karl Hasselström
2008-02-27 11:27       ` Karl Hasselström
2008-02-27 19:48         ` Junio C Hamano
2008-02-28  7:06           ` Karl Hasselström
2008-02-28  7:46             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763whkmxf.fsf@wine.dyndns.org \
    --to=julliard@winehq.org \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).