From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: [PATCH] git status: print files under untracked dir if -a is given Date: Tue, 30 May 2006 17:46:17 +0900 Message-ID: <87slmrdhe6.wl@mail2.atmark-techno.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: tetsuya@atmark-techno.com X-From: git-owner@vger.kernel.org Tue May 30 10:52:36 2006 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FkzxY-00052o-46 for gcvg-git@gmane.org; Tue, 30 May 2006 10:52:17 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932192AbWE3IwN (ORCPT ); Tue, 30 May 2006 04:52:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932193AbWE3IwN (ORCPT ); Tue, 30 May 2006 04:52:13 -0400 Received: from shop.atmark-techno.com ([210.191.215.173]:43940 "EHLO mail2.atmark-techno.com") by vger.kernel.org with ESMTP id S932192AbWE3IwN (ORCPT ); Tue, 30 May 2006 04:52:13 -0400 Received: from smtp.local-network (dns1.atmark-techno.com [210.191.215.170]) by mail2.atmark-techno.com (Postfix) with ESMTP id AC9052943C; Tue, 30 May 2006 17:52:07 +0900 (JST) Received: from localhost.atmark-techno.com (unknown [192.168.10.81]) by smtp.local-network (Postfix) with ESMTP id 96D0DB61F; Tue, 30 May 2006 18:00:11 +0900 (JST) To: git@vger.kernel.org User-Agent: Wanderlust/2.14.0 Date: Tue, 30 May 2006 17:49:49 +0900 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: git status: print files under untracked dir if -a is given git status (git-commit.sh) currently doesn't show files under untracked directory. this is inconvenient when adding many files under new directory. this patch change its behavior to show files under untracked directory if option --all is given. Signed-off-by: Yasushi SHOJI --- 3d3fa8f19c7d9b03b1a6e510970633ec8be7adac git-commit.sh | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) 3d3fa8f19c7d9b03b1a6e510970633ec8be7adac diff --git a/git-commit.sh b/git-commit.sh index 6ef1a9d..0cde305 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -134,13 +134,18 @@ #' report "Changed but not updated" \ "use git-update-index to mark for commit" + if test -z "$all" + then + directory_opt="--directory" + fi + if test -f "$GIT_DIR/info/exclude" then - git-ls-files -z --others --directory \ + git-ls-files -z --others $directory_opt \ --exclude-from="$GIT_DIR/info/exclude" \ --exclude-per-directory=.gitignore else - git-ls-files -z --others --directory \ + git-ls-files -z --others $directory_opt \ --exclude-per-directory=.gitignore fi | perl -e '$/ = "\0"; -- 1.3.3.g70f7