From 44f3c062000d6717b13c7808228509ec4422ceff Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Sun, 8 Aug 2021 15:30:36 +0900 Subject: [PATCH] include/git: Add module for interaction with git repositories This commit adds a module that can be used to perform operations such as cloning, merging, pushing, etc on a git repository without having to change directories. --- include/git.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/git.sh b/include/git.sh index 620c62a..6fbf730 100644 --- a/include/git.sh +++ b/include/git.sh @@ -42,7 +42,7 @@ git_clone() { git_current_branch() { local repository="$1" - if ! grep -oP "refs/heads/\K.*" < "$repository/.git/HEAD"; then + if ! grep -oP "refs/heads/\\K.*" < "$repository/.git/HEAD"; then log_error "Could not get current branch of $repository" return 1 fi -- 2.47.3