From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 07/12] add core.columns
Date: Sun, 7 Mar 2010 19:09:40 +0700 [thread overview]
Message-ID: <1267963785-473-8-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1267963785-473-1-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
Documentation/config.txt | 8 ++++++++
cache.h | 1 +
config.c | 6 ++++++
environment.c | 1 +
4 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index c80262b..d299eaf 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -533,6 +533,14 @@ core.sparseCheckout::
Enable "sparse checkout" feature. See section "Sparse checkout" in
linkgit:git-read-tree[1] for more information.
+core.columns::
+ Specify whether a command should output in columns. Only commands
+ that support `--columns` will be affected by this. This variable can
+ take either `never` (do not output in columns), `auto` (output in
+ columns if the output is to a terminal) or `always` (always output in
+ columns). Setting `--columns` or `--no-columns` will override this
+ variable. This option defaults to never.
+
add.ignore-errors::
Tells 'git add' to continue adding files when some files cannot be
added due to indexing errors. Equivalent to the '--ignore-errors'
diff --git a/cache.h b/cache.h
index 124f100..84211d2 100644
--- a/cache.h
+++ b/cache.h
@@ -549,6 +549,7 @@ extern int read_replace_refs;
extern int fsync_object_files;
extern int core_preload_index;
extern int core_apply_sparse_checkout;
+extern int core_column_output;
enum safe_crlf {
SAFE_CRLF_FALSE = 0,
diff --git a/config.c b/config.c
index 6963fbe..602c4f6 100644
--- a/config.c
+++ b/config.c
@@ -7,6 +7,7 @@
*/
#include "cache.h"
#include "exec_cmd.h"
+#include "color.h"
#define MAXNAME (256)
@@ -523,6 +524,11 @@ static int git_default_core_config(const char *var, const char *value)
return 0;
}
+ if (!strcmp(var, "core.columns")) {
+ core_column_output = git_config_colorbool(var, value, -1);
+ return 0;
+ }
+
/* Add other config variables here and to Documentation/config.txt. */
return 0;
}
diff --git a/environment.c b/environment.c
index 876c5e5..4329435 100644
--- a/environment.c
+++ b/environment.c
@@ -52,6 +52,7 @@ enum object_creation_mode object_creation_mode = OBJECT_CREATION_MODE;
char *notes_ref_name;
int grafts_replace_parents = 1;
int core_apply_sparse_checkout;
+int core_column_output;
/* Parallel index stat data preload? */
int core_preload_index = 0;
--
1.7.0.1.370.gd3c5
next prev parent reply other threads:[~2010-03-07 12:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-07 12:09 [PATCH 00/12] Support columinized output in tag/branch/ls-files/grep Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 01/12] Move term_columns() to pager.c Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 02/12] setup_pager(): save terminal width before redirecting stdout Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 03/12] Add columnizer Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 04/12] help: use columnizer Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 05/12] Add builtin command "column" Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 06/12] Add helpers to redirect stdout to "git column" Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` Nguyễn Thái Ngọc Duy [this message]
2010-03-07 12:09 ` [PATCH 08/12] tag: support column output with --columns Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 09/12] branch: " Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 10/12] ls-files: " Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 11/12] grep: do not return early in cmd_grep() if there is no error Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 12/12] grep: support column output with --columns Nguyễn Thái Ngọc Duy
2010-03-08 14:08 ` [PATCH 00/12] Support columinized output in tag/branch/ls-files/grep René Scharfe
2010-03-08 14:32 ` Nguyen Thai Ngoc Duy
2010-03-09 16:49 ` René Scharfe
2010-03-10 0:27 ` Nguyen Thai Ngoc Duy
2010-03-10 7:26 ` Johannes Sixt
2010-03-10 12:12 ` Nguyen Thai Ngoc Duy
2010-03-11 21:13 ` René Scharfe
2010-03-12 4:22 ` Nguyen Thai Ngoc Duy
2010-03-08 23:08 ` Junio C Hamano
2010-03-09 2:06 ` Nguyen Thai Ngoc Duy
2010-03-09 2:14 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1267963785-473-8-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.