From d90086956e403c9dedf958ee3dde1825becedd59 Mon Sep 17 00:00:00 2001
From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr>
Date: Thu, 12 May 2022 15:08:56 +0200
Subject: [PATCH] src/init.rs: add mode parameter in init_and_hook function

---
 src/init.rs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/init.rs b/src/init.rs
index cead230..7ac789f 100644
--- a/src/init.rs
+++ b/src/init.rs
@@ -73,9 +73,10 @@ fn init_repository() {
 /// # Arguments:
 /// * `hooks`: a boolean indicating wether or not to create hooks
 /// * `compression`: The compression used automatically after each commit. This parameter is only used if hooks is true.
-pub fn init_and_hook(hooks: bool, compression: &str) {
+/// * `mode`: The checkout mode used by gblk automatically after a git checkout: soft or hard.
+pub fn init_and_hook(hooks: bool, compression: &str, mode: &str) {
     init_repository();
     if hooks {
-        create_hooks::create_hooks(compression);
+        create_hooks::create_hooks(compression, mode);
     }
 }
\ No newline at end of file
-- 
GitLab