git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git status and empty directories

From
Linus Torvalds <torvalds@osdl.org>
Date
May 18, 2006, 18:12 UTC
Message-ID
<Pine.LNX.4.64.0605181112040.10823@g5.osdl.org>
In-Reply-To
<E1Fgmkh-0000ur-Hn@moooo.ath.cx>
On Thu, 18 May 2006, Matthias Lederhofer wrote:
>
> - hide empty directories if the user does not ask explicitly for them
>   with a command line option
Like this?
Makes sense to me, although I didn't add the option to disable it.
		Linus
---
diff --git a/git-commit.sh b/git-commit.sh
index 6ef1a9d..ed00b5c 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -136,11 +136,11 @@ #'
 
 	if test -f "$GIT_DIR/info/exclude"
 	then
-	    git-ls-files -z --others --directory \
+	    git-ls-files -z --others --directory --no-empty-directory \
 		--exclude-from="$GIT_DIR/info/exclude" \
 		--exclude-per-directory=.gitignore
 	else
-	    git-ls-files -z --others --directory \
+	    git-ls-files -z --others --directory --no-empty-directory \
 		--exclude-per-directory=.gitignore
 	fi |
 	perl -e '$/ = "\0";
Previous: Matthias LederhoferNext: Matthias Lederhofer
Message 2 of 3 in “git status and empty directories”
  1. Matthias LederhoferMay 18, 2006
  2. Linus TorvaldsMay 18, 2006
  3. Matthias LederhoferMay 18, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.