[gitg] Add --no-color to some git commands
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Add --no-color to some git commands
- Date: Sat, 29 May 2010 10:52:56 +0000 (UTC)
commit 4df201dc16922b5adf03999b3571b3eae2f65e88
Author: Daniel Nyström <daniel nystrom st>
Date: Wed May 5 23:09:47 2010 +0800
Add --no-color to some git commands
This makes sure that the ANSI escape codes do not appear due to user
configuration, e.g. color.ui=always
Signed-off-by: Chow Loong Jin <hyperair ubuntu com>
https://bugzilla.gnome.org/show_bug.cgi?id=617776
gitg/gitg-commit-view.c | 2 +-
gitg/gitg-revision-view.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gitg/gitg-commit-view.c b/gitg/gitg-commit-view.c
index 99e90bd..d332fce 100644
--- a/gitg/gitg-commit-view.c
+++ b/gitg/gitg-commit-view.c
@@ -461,7 +461,7 @@ unstaged_selection_changed(GtkTreeSelection *selection, GitgCommitView *view)
gchar ct[10];
g_snprintf(ct, sizeof(ct), "-U%d", view->priv->context_size);
- gitg_repository_run_commandv(view->priv->repository, view->priv->runner, NULL, "diff", ct, "--", path, NULL);
+ gitg_repository_run_commandv(view->priv->repository, view->priv->runner, NULL, "diff", "--no-color", ct, "--", path, NULL);
g_free(path);
}
diff --git a/gitg/gitg-revision-view.c b/gitg/gitg-revision-view.c
index db9ee76..dca5046 100644
--- a/gitg/gitg-revision-view.c
+++ b/gitg/gitg-revision-view.c
@@ -736,19 +736,19 @@ update_diff(GitgRevisionView *self, GitgRepository *repository)
case 't':
gitg_repository_run_commandv(self->priv->repository, self->priv->diff_runner, NULL,
"diff", "--cached", "-M", "--pretty=format:%s%n%n%b",
- "--encoding=UTF-8", NULL);
+ "--encoding=UTF-8", "--no-color", NULL);
break;
case 'u':
gitg_repository_run_commandv(self->priv->repository, self->priv->diff_runner, NULL,
"diff", "-M", "--pretty=format:%s%n%n%b",
- "--encoding=UTF-8", NULL);
+ "--encoding=UTF-8", "--no-color", NULL);
break;
default:
{
gchar *hash = gitg_revision_get_sha1(self->priv->revision);
gitg_repository_run_commandv(self->priv->repository, self->priv->diff_runner, NULL,
"show", "-M", "--pretty=format:%s%n%n%b",
- "--encoding=UTF-8", hash, NULL);
+ "--encoding=UTF-8", "--no-color", hash, NULL);
g_free(hash);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]