From 69174638916273cebe344de1957256388e45c7dd Mon Sep 17 00:00:00 2001 From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr> Date: Wed, 8 Jun 2022 14:47:58 +0200 Subject: [PATCH] src/create_hooks.rs: add co alias in .git/config --- src/create_hooks.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/create_hooks.rs b/src/create_hooks.rs index 7a10067..486e745 100644 --- a/src/create_hooks.rs +++ b/src/create_hooks.rs @@ -43,7 +43,6 @@ fn get_hooks_folder() -> PathBuf { p } - /// Function used to create a file /// /// # Arguments: @@ -84,7 +83,6 @@ fn create_file(folder: &PathBuf, file_name: &str, content: &str) { }); } - /// Add a gblkco alias in `.git/config` file at the end to ensure a quiet /// Checkout and a quiet cancel of this checkout fn update_config_file() { @@ -100,7 +98,7 @@ fn update_config_file() { .append(true) .open(&git_config) .unwrap(); - writeln!(file, "[alias]\n\tgblkco = checkout -q").unwrap(); + writeln!(file, "[alias]\n\tco = checkout -q").unwrap(); } /// Create 2 files in `.git/hooks` folder @@ -121,7 +119,7 @@ pub fn create_hooks(compression: &str, mode: &str) { original_commit=${{arr[5]}} \n\ target_commit=${{arr[7]}} \n\ \n - git -c core.hooksPath=/dev/null gblkco ${{original_commit}} && gblk pre-co && git -c core.hooksPath=/dev/null checkout ${{target_commit}} && gblk co --mode {} + git -c core.hooksPath=/dev/null co ${{original_commit}} && gblk pre-co && git -c core.hooksPath=/dev/null checkout ${{target_commit}} && gblk checkout --mode {} ", mode); let post_co_cmd = post_co_cmd.as_str(); let v = vec![post_commit_cmd, post_co_cmd]; -- GitLab