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>
}
else if (!strcmp(argv[i], "--verbose"))
s.verbose = 1;
+ else if (!strcmp(argv[i], "--untracked"))
+ s.untracked = 1;
else
usage(runstatus_usage);
}
esac
git-runstatus ${color} \
${verbose:+--verbose} \
- ${amend:+--amend}
+ ${amend:+--amend} \
+ ${untracked_files:+--untracked}
}
trap '
s->amend = 0;
s->verbose = 0;
s->commitable = 0;
+ s->untracked = 0;
}
static void wt_status_print_header(const char *main, const char *sub)
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);
int commitable;
int verbose;
int amend;
+ int untracked;
};
int git_status_config(const char *var, const char *value);