summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bfe9793)
raw | patch | inline | side by side (parent: bfe9793)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 13 Oct 2007 14:56:37 +0000 (16:56 +0200) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 13 Oct 2007 14:56:37 +0000 (16:56 +0200) |
This fixes problems when user has set color.diff=true. The problem was
first reported for gitk on the git mailing list.
first reported for gitk on the git mailing list.
tig.c | patch | blob | history |
index 7bbdc82832a3e59e062c97dda952ffbad3aa5ffb..f6bb9f3ef64d4e3cde92a9a7b557f79326931498 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -105,13 +105,13 @@ static size_t utf8_length(const char *string, size_t max_width, int *coloffset,
"git ls-remote $(git rev-parse --git-dir) 2>/dev/null"
#define TIG_DIFF_CMD \
- "git show --root --patch-with-stat --find-copies-harder -B -C %s 2>/dev/null"
+ "git show --no-color --root --patch-with-stat --find-copies-harder -B -C %s 2>/dev/null"
#define TIG_LOG_CMD \
- "git log --cc --stat -n100 %s 2>/dev/null"
+ "git log --no-color --cc --stat -n100 %s 2>/dev/null"
#define TIG_MAIN_CMD \
- "git log --topo-order --pretty=raw %s 2>/dev/null"
+ "git log --no-color --topo-order --pretty=raw %s 2>/dev/null"
#define TIG_TREE_CMD \
"git ls-tree %s %s"
if (opt_request == REQ_VIEW_MAIN)
/* XXX: This is vulnerable to the user overriding
* options required for the main view parser. */
- string_copy(opt_cmd, "git log --pretty=raw");
+ string_copy(opt_cmd, "git log --no-color --pretty=raw");
else
string_copy(opt_cmd, "git");
buf_size = strlen(opt_cmd);
"git ls-files -z --others --exclude-per-directory=.gitignore"
#define STATUS_DIFF_SHOW_CMD \
- "git diff --root --patch-with-stat --find-copies-harder -B -C %s -- %s 2>/dev/null"
+ "git diff --no-color --root --patch-with-stat --find-copies-harder -B -C %s -- %s 2>/dev/null"
/* First parse staged info using git-diff-index(1), then parse unstaged
* info using git-diff-files(1), and finally untracked files using