summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c91f0d9)
raw | patch | inline | side by side (parent: c91f0d9)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Tue, 12 Sep 2006 20:45:12 +0000 (22:45 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 13 Sep 2006 06:20:17 +0000 (23:20 -0700) |
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>
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>
builtin-runstatus.c | patch | blob | history | |
git-commit.sh | patch | blob | history | |
wt-status.c | patch | blob | history | |
wt-status.h | patch | blob | history |
diff --git a/builtin-runstatus.c b/builtin-runstatus.c
index 7979d612912f629b83d96024d3402df005e53ca3..303c556da03664cdfe006525a95664e47c166805 100644 (file)
--- a/builtin-runstatus.c
+++ b/builtin-runstatus.c
}
else if (!strcmp(argv[i], "--verbose"))
s.verbose = 1;
+ else if (!strcmp(argv[i], "--untracked"))
+ s.untracked = 1;
else
usage(runstatus_usage);
}
diff --git a/git-commit.sh b/git-commit.sh
index 10c269a8de8b5543120099a9b0f71f99aca89de7..5a4c659b6fb5f0b23c6a10b0e3bd69893d9c380a 100755 (executable)
--- a/git-commit.sh
+++ b/git-commit.sh
esac
git-runstatus ${color} \
${verbose:+--verbose} \
- ${amend:+--amend}
+ ${amend:+--amend} \
+ ${untracked_files:+--untracked}
}
trap '
diff --git a/wt-status.c b/wt-status.c
index ec2c7286b1fdbddda8e305a32549ca1362e36b64..c644331b127e9f4321d916f474ac796b8ab2a9bf 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
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);
diff --git a/wt-status.h b/wt-status.h
index 75d3cfef9550f9bd109e1415c1678e036c04d7d5..0a5a5b7ba9fc1d50c7dcab8220a4fb77ffecddb4 100644 (file)
--- a/wt-status.h
+++ b/wt-status.h
int commitable;
int verbose;
int amend;
+ int untracked;
};
int git_status_config(const char *var, const char *value);