summaryrefslogtreecommitdiff
path: root/wt-status.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-05-07 15:35:03 -0400
committerJeff King <peff@peff.net>2012-05-08 04:57:42 -0400
commit4d2292e9a90465cbfa23f1c170c11423d11830df (patch)
tree6d0520696bf47710ff46d19f5d46d08b8de7f633 /wt-status.h
parent5410ae422b0f3cfe604d393addcd13526e940112 (diff)
downloadgit-4d2292e9a90465cbfa23f1c170c11423d11830df.tar.gz
status: refactor colopts handling
The current code reads the config and command-line options into a separate "colopts" variable, and then copies the contents of that variable into the "struct wt_status". We can eliminate the extra variable and copy just write straight into the wt_status struct. This simplifies the "status" code a little bit. Unfortunately, it makes the "commit" code one line more complex; a side effect of the separate variable was that "commit" did not copy the colopts variable, so any column.status configuration had no effect. The result still ends up cleaner, though. In the previous version, it was unclear whether commit simply forgot to copy the colopt variable, or whether it was intentional. Now it explicitly turns off column options. Furthermore, if commit later learns to respect column.status, this will make the end result simpler. I punted on just adding that feature now, because it was sufficiently non-obvious that it should not go into a refactoring patch. Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'wt-status.h')
-rw-r--r--wt-status.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/wt-status.h b/wt-status.h
index f4c949bed2..14aa9f7e13 100644
--- a/wt-status.h
+++ b/wt-status.h
@@ -56,7 +56,7 @@ struct wt_status {
enum untracked_status_type show_untracked_files;
const char *ignore_submodule_arg;
char color_palette[WT_STATUS_MAXSLOT][COLOR_MAXLEN];
- int colopts;
+ unsigned colopts;
int null_termination;
int show_branch;