aboutsummaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-09-12 22:45:12 +0200
committerJunio C Hamano <junkio@cox.net>2006-09-12 23:20:17 -0700
commit2074cb0af339f586cab6e0cdc20c4eadf3ba93e8 (patch)
tree28109bfd381be45f4a37f14413cf44f612c060ac /wt-status.c
parentc91f0d92efb36d7b349f586cafafaf0e6ac3f5b2 (diff)
downloadgit-2074cb0af339f586cab6e0cdc20c4eadf3ba93e8.tar.gz
git-2074cb0af339f586cab6e0cdc20c4eadf3ba93e8.tar.xz
Teach runstatus about --untracked
Actually, teach runstatus what to do if it is not passed; it should not list the contents of completely untracked directories, but only the name of that directory (plus a trailing '/'). [jc: with comments by Jeff King to match hide-empty-directories behaviour of the original.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/wt-status.c b/wt-status.c
index ec2c7286b..c644331b1 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -50,6 +50,7 @@ void wt_status_prepare(struct wt_status *s)
s->amend = 0;
s->verbose = 0;
s->commitable = 0;
+ s->untracked = 0;
}
static void wt_status_print_header(const char *main, const char *sub)
@@ -188,6 +189,10 @@ static void wt_status_print_untracked(const struct wt_status *s)
memset(&dir, 0, sizeof(dir));
dir.exclude_per_dir = ".gitignore";
+ if (!s->untracked) {
+ dir.show_other_directories = 1;
+ dir.hide_empty_directories = 1;
+ }
x = git_path("info/exclude");
if (file_exists(x))
add_excludes_from_file(&dir, x);