Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-18 22:16:55 +0400
committerJunio C Hamano <gitster@pobox.com>2010-06-18 22:16:55 +0400
commit880bd9d08081752bb4e2891aa3c16c82808ecb2e (patch)
tree03528a146b1e7cca8a7c57b1f9574d05a9ec9ffd /builtin
parent7c1b228d26107d2cac9fd9549a6a1cff41c24b51 (diff)
parent46077fa5d477a3e96e0bb96042a2a9fdc9c818cb (diff)
Merge branch 'mg/status-b'
* mg/status-b: Documentation+t5708: document and test status -s -b Show branch information in short output of git status
Diffstat (limited to 'builtin')
-rw-r--r--builtin/commit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index a4e4966319..a861686643 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -93,6 +93,7 @@ static enum {
STATUS_FORMAT_SHORT,
STATUS_FORMAT_PORCELAIN,
} status_format = STATUS_FORMAT_LONG;
+static int status_show_branch;
static int opt_parse_m(const struct option *opt, const char *arg, int unset)
{
@@ -134,6 +135,7 @@ static struct option builtin_commit_options[] = {
OPT_BOOLEAN(0, "dry-run", &dry_run, "show what would be committed"),
OPT_SET_INT(0, "short", &status_format, "show status concisely",
STATUS_FORMAT_SHORT),
+ OPT_BOOLEAN(0, "branch", &status_show_branch, "show branch information"),
OPT_SET_INT(0, "porcelain", &status_format,
"show porcelain output format", STATUS_FORMAT_PORCELAIN),
OPT_BOOLEAN('z', "null", &null_termination,
@@ -424,7 +426,7 @@ static int run_status(FILE *fp, const char *index_file, const char *prefix, int
switch (status_format) {
case STATUS_FORMAT_SHORT:
- wt_shortstatus_print(s, null_termination);
+ wt_shortstatus_print(s, null_termination, status_show_branch);
break;
case STATUS_FORMAT_PORCELAIN:
wt_porcelain_print(s, null_termination);
@@ -1036,6 +1038,8 @@ int cmd_status(int argc, const char **argv, const char *prefix)
OPT__VERBOSE(&verbose),
OPT_SET_INT('s', "short", &status_format,
"show status concisely", STATUS_FORMAT_SHORT),
+ OPT_BOOLEAN('b', "branch", &status_show_branch,
+ "show branch information"),
OPT_SET_INT(0, "porcelain", &status_format,
"show porcelain output format",
STATUS_FORMAT_PORCELAIN),
@@ -1088,7 +1092,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
switch (status_format) {
case STATUS_FORMAT_SHORT:
- wt_shortstatus_print(&s, null_termination);
+ wt_shortstatus_print(&s, null_termination, status_show_branch);
break;
case STATUS_FORMAT_PORCELAIN:
wt_porcelain_print(&s, null_termination);