Cc: Jeff King p...@peff.net
In f3f47a1 (status: add --long output format option), STATUS_FORMAT_NONE
was introduced, meaning the user did not specify anything. Rename this
to *_DEFAULT to better indicate its meaning.
This paves the way for _NONE to really mean no status.
Signed-off-by: Tay Ray Chuan rcta...@gmail.com
---
builtin/commit.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index 3783bca..2e86b76 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -125,7 +125,7 @@ static const char *only_include_assumed;
static struct strbuf message = STRBUF_INIT;
static enum status_format {
- STATUS_FORMAT_NONE = 0,
+ STATUS_FORMAT_DEFAULT = 0,
STATUS_FORMAT_LONG,
STATUS_FORMAT_SHORT,
STATUS_FORMAT_PORCELAIN,
@@ -487,7 +487,7 @@ static int run_status(FILE *fp, const char *index_file,
const char *prefix, int
case STATUS_FORMAT_UNSPECIFIED:
die(BUG: finalize_deferred_config() should have been called);
break;
- case STATUS_FORMAT_NONE:
+ case STATUS_FORMAT_DEFAULT:
case STATUS_FORMAT_LONG:
wt_status_print(s);
break;
@@ -1028,7 +1028,7 @@ static void finalize_deferred_config(struct wt_status *s)
!s-null_termination);
if (s-null_termination) {
- if (status_format == STATUS_FORMAT_NONE ||
+ if (status_format == STATUS_FORMAT_DEFAULT ||
status_format == STATUS_FORMAT_UNSPECIFIED)
status_format = STATUS_FORMAT_PORCELAIN;
else if (status_format == STATUS_FORMAT_LONG)
@@ -1038,7 +1038,7 @@ static void finalize_deferred_config(struct wt_status *s)
if (use_deferred_config status_format == STATUS_FORMAT_UNSPECIFIED)
status_format = status_deferred_config.status_format;
if (status_format == STATUS_FORMAT_UNSPECIFIED)
- status_format = STATUS_FORMAT_NONE;
+ status_format = STATUS_FORMAT_DEFAULT;
if (use_deferred_config s-show_branch 0)
s-show_branch = status_deferred_config.show_branch;
@@ -1141,7 +1141,7 @@ static int parse_and_validate_options(int argc, const
char *argv[],
if (all argc 0)
die(_(Paths with -a does not make sense.));
- if (status_format != STATUS_FORMAT_NONE)
+ if (status_format != STATUS_FORMAT_DEFAULT)
dry_run = 1;
return argc;
@@ -1197,7 +1197,7 @@ static int git_status_config(const char *k, const char
*v, void *cb)
if (git_config_bool(k, v))
status_deferred_config.status_format =
STATUS_FORMAT_SHORT;
else
- status_deferred_config.status_format =
STATUS_FORMAT_NONE;
+ status_deferred_config.status_format =
STATUS_FORMAT_DEFAULT;
return 0;
}
if (!strcmp(k, status.branch)) {
@@ -1314,7 +1314,7 @@ int cmd_status(int argc, const char **argv, const char
*prefix)
case STATUS_FORMAT_UNSPECIFIED:
die(BUG: finalize_deferred_config() should have been called);
break;
- case STATUS_FORMAT_NONE:
+ case STATUS_FORMAT_DEFAULT:
case STATUS_FORMAT_LONG:
s.verbose = verbose;
s.ignore_submodule_arg = ignore_submodule_arg;
@@ -1522,7 +1522,7 @@ int cmd_commit(int argc, const char **argv, const char
*prefix)
usage_with_options(builtin_commit_usage,
builtin_commit_options);
status_init_config(s, git_commit_config);
- status_format = STATUS_FORMAT_NONE; /* Ignore status.short */
+ status_format = STATUS_FORMAT_DEFAULT; /* Ignore status.short */
s.colopts = 0;
if (get_sha1(HEAD, sha1))
--
1.9.0.291.g027825b
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html