[gitg] Run commit-msg hook when commiting
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Run commit-msg hook when commiting
- Date: Fri, 19 Aug 2011 17:11:30 +0000 (UTC)
commit e9ca2489f9e8a90fc99a18a05cb9748f6cd3117b
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Fri Aug 19 19:11:21 2011 +0200
Run commit-msg hook when commiting
libgitg/gitg-commit.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/libgitg/gitg-commit.c b/libgitg/gitg-commit.c
index dcfe6c3..6b734f1 100644
--- a/libgitg/gitg-commit.c
+++ b/libgitg/gitg-commit.c
@@ -1222,7 +1222,18 @@ gitg_commit_commit (GitgCommit *commit,
g_object_unref (git_dir);
g_object_unref (child);
- g_file_set_contents (path, comment, -1, NULL);\
+ g_file_set_contents (path, comment, -1, NULL);
+
+ if (!gitg_repository_run_hook (commit->priv->repository,
+ "commit-msg",
+ error,
+ path,
+ NULL))
+ {
+ g_free (path);
+ return FALSE;
+ }
+
g_free (path);
gchar *ref;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]