From 6cb2a990ba107284a5eee9cd1b79d5b4de903fe0 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Wed, 14 Mar 2018 18:01:06 +0100 Subject: Improve generation of absolute directories --- bin/incremental-git-filterbranch.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/bin/incremental-git-filterbranch.sh b/bin/incremental-git-filterbranch.sh index 06cb300..618f390 100755 --- a/bin/incremental-git-filterbranch.sh +++ b/bin/incremental-git-filterbranch.sh @@ -47,7 +47,7 @@ Where: By default, all branches will be processed. --tags how tags should be processed. This can be one of these values: - visited: process only the tags visited (default) + visited: process only the tags visited (default) none: do not process any tag all: process all tags --blacklist @@ -194,13 +194,10 @@ readParameters () { absolutizeUrl () { absolutizeUrl_url="${1}" - case "${absolutizeUrl_url}" in - [/\\]* | ?*:*) - ;; - *) - absolutizeUrl_url=$(cd "${absolutizeUrl_url}" && pwd) - ;; - esac + if test -d "${1}" + then + absolutizeUrl_url=$(cd "${absolutizeUrl_url}" && pwd) + fi printf '%s' "${absolutizeUrl_url}" } -- cgit v1.2.3