From 2d1736e7b5d256dd33dc0a4bbbba6785054b3461 Mon Sep 17 00:00:00 2001 From: Benjamin Lupton Date: Tue, 4 Feb 2025 03:39:02 +0800 Subject: [PATCH] git-helper: add support for `--no-path` --- commands/git-helper | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/git-helper b/commands/git-helper index 1d354e961..f839e0c16 100755 --- a/commands/git-helper +++ b/commands/git-helper @@ -18,7 +18,8 @@ function git_helper() ( OPTIONS: --path= Instead of the current working directory, use this path as the git repository. - + --no-path + Use a temporary directory as the container for the git repository. --verify Verify the contains an initialised git repository before proceeding with the . @@ -73,7 +74,7 @@ function git_helper() ( current exit code 0 updated exit code 0 - umt | upstream-modification-times + upstream-modification-times | umt Update the modification times of cloned files to that of their commits, rather than the time of cloning. verify @@ -96,6 +97,7 @@ function git_helper() ( case "$item" in '--help' | '-h') help ;; '--path='*) option_path="${item#*=}" ;; + '--no-path') option_path="$(fs-temp --directory='git-helper' --directory --touch)" ;; '--no-verify'* | '--verify'*) option_verify="$(get-flag-value --affirmative --fallback="$option_verify" -- "$item")" ;;