[gnome-builder] git: log warnings at higher priority
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] git: log warnings at higher priority
- Date: Tue, 12 Jun 2018 22:07:48 +0000 (UTC)
commit 0ee7006a8adec792cc7f6411a9fbb18247867900
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 12 15:00:42 2018 -0700
git: log warnings at higher priority
This is useful so we actually see a message about git failures from
collation keys (which I found when testing Boxes).
src/plugins/git/ide-git-buffer-change-monitor.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/git/ide-git-buffer-change-monitor.c b/src/plugins/git/ide-git-buffer-change-monitor.c
index 676720a7b..2a2de5d1c 100644
--- a/src/plugins/git/ide-git-buffer-change-monitor.c
+++ b/src/plugins/git/ide-git-buffer-change-monitor.c
@@ -66,6 +66,7 @@ struct _IdeGitBufferChangeMonitor
guint in_calculation : 1;
guint delete_range_requires_recalculation : 1;
guint is_child_of_workdir : 1;
+ guint in_failed_state : 1;
};
typedef struct
@@ -267,13 +268,17 @@ ide_git_buffer_change_monitor__calculate_cb (GObject *object,
if (lines == NULL)
{
- if (!g_error_matches (error, GGIT_ERROR, GGIT_ERROR_NOTFOUND))
- g_message ("%s", error->message);
+ if (!self->in_failed_state && !g_error_matches (error, GGIT_ERROR, GGIT_ERROR_NOTFOUND))
+ {
+ g_warning ("Failed to calculate git line changes: %s", error->message);
+ self->in_failed_state = TRUE;
+ }
}
else
{
g_clear_pointer (&self->lines, g_array_unref);
self->lines = g_steal_pointer (&lines);
+ self->in_failed_state = FALSE;
}
ide_buffer_change_monitor_emit_changed (IDE_BUFFER_CHANGE_MONITOR (self));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]