diff options
author | Marius Storm-Olsen <marius@trolltech.com> | 2008-06-05 14:22:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-09 15:48:19 -0700 |
commit | 6c2ce048bbfc6fbc2bdd86a3e586cb8881eb2dc2 (patch) | |
tree | 8b83b37d8320cd893441b3aa7cd5e2faa3b0a575 /wt-status.c | |
parent | Add an optional <mode> argument to commit/status -u|--untracked-files option (diff) | |
download | tgif-6c2ce048bbfc6fbc2bdd86a3e586cb8881eb2dc2.tar.xz |
Add argument 'no' commit/status option -u|--untracked-files
This new argument teaches Git to not look for any untracked files,
saving cycles on slow file systems, or large repos.
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c index 25d998513e..23017e4d46 100644 --- a/wt-status.c +++ b/wt-status.c @@ -348,7 +348,10 @@ void wt_status_print(struct wt_status *s) wt_status_print_changed(s); if (wt_status_submodule_summary) wt_status_print_submodule_summary(s); - wt_status_print_untracked(s); + if (show_untracked_files) + wt_status_print_untracked(s); + else if (s->commitable) + fprintf(s->fp, "# Untracked files not listed (use -u option to show untracked files)\n"); if (s->verbose && !s->is_initial) wt_status_print_verbose(s); @@ -363,6 +366,8 @@ void wt_status_print(struct wt_status *s) printf("nothing added to commit but untracked files present (use \"git add\" to track)\n"); else if (s->is_initial) printf("nothing to commit (create/copy files and use \"git add\" to track)\n"); + else if (!show_untracked_files) + printf("nothing to commit (use -u to show untracked files)\n"); else printf("nothing to commit (working directory clean)\n"); } |