From 3a226ed5bb61719f3ff1236b5f69e107ec4db47d Mon Sep 17 00:00:00 2001 From: Anthony Axenov Date: Mon, 24 Mar 2025 19:47:30 +0800 Subject: [PATCH] git helpers misc --- helpers/git.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/helpers/git.sh b/helpers/git.sh index 477fc6a..b5ea10f 100644 --- a/helpers/git.sh +++ b/helpers/git.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash _dir=$( dirname $(readlink -e -- "${BASH_SOURCE}")) -source $_dir/io.sh || exit 255 -source $_dir/basic.sh || exit 255 -source $_dir/pkg.sh || exit 255 +source "$_dir/io.sh" || exit 255 +source "$_dir/basic.sh" || exit 255 +source "$_dir/pkg.sh" || exit 255 ######################################################## # Shorthands for git @@ -10,7 +10,7 @@ source $_dir/pkg.sh || exit 255 git.clone_quick() { require git - git clone --depth=1 --single-branch $* + git clone --depth=1 --single-branch "$*" } git.is_repo() { @@ -64,12 +64,12 @@ git.reset() { git.clone() { require git - git clone $* 2>&1 + git clone "$*" 2>&1 } git.co() { require git - git checkout $* 2>&1 + git checkout "$*" 2>&1 } git.is_it_current_branch() {