[gitg] Manage if there's no textconv config



commit bc2f46f2d8306cc126a372329b107f9c7228dab9
Author: Alberto Fanjul <albertofanjul gmail com>
Date:   Mon Dec 27 13:47:02 2021 +0100

    Manage if there's no textconv config

 libgitg/gitg-textconv.vala | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/libgitg/gitg-textconv.vala b/libgitg/gitg-textconv.vala
index 5def89f5..b2fb8f99 100755
--- a/libgitg/gitg-textconv.vala
+++ b/libgitg/gitg-textconv.vala
@@ -36,7 +36,13 @@ public class TextConv
                if (diffattr != null)
                {
                        var textconv_key = "diff.%s.textconv".printf(diffattr);
-                       command = repository.get_config().get_entry(textconv_key).get_value();
+                       try
+                       {
+                               command = repository.get_config().get_string(textconv_key);
+                       }
+                       catch (GLib.Error e)
+                       {
+                       }
                }
                return command;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]