[gitg] Get commit template from workdir if path is relative



commit b66244da7e238d29af8a837e81462597e3bed886
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Tue Dec 22 12:17:26 2015 +0100

    Get commit template from workdir if path is relative

 gitg/commit/gitg-commit-dialog.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gitg/commit/gitg-commit-dialog.vala b/gitg/commit/gitg-commit-dialog.vala
index 7a5cafb..aa3b519 100644
--- a/gitg/commit/gitg-commit-dialog.vala
+++ b/gitg/commit/gitg-commit-dialog.vala
@@ -661,6 +661,11 @@ class Dialog : Gtk.Dialog
                        {
                                var path = Gitg.Utils.expand_home_dir(template_path);
 
+                               if (!GLib.Path.is_absolute(path))
+                               {
+                                       path = repository.get_workdir().get_child(path).get_path();
+                               }
+
                                string contents;
                                size_t len;
 


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