From 5e9677cbdf1840836e22d9cf23198de34877e283 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Thu, 30 Sep 2010 14:24:07 +0100 Subject: git-am: fix detection of absolute paths for windows Add an is_absolute_path function to abstract out platform differences in checking for an absolute or relative path. Specifically fixes t4150-am on Windows. [PT: updated following suggestion from j6t to support \* and //*] Signed-off-by: Johannes Sixt Signed-off-by: Pat Thoyts --- git-am.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'git-am.sh') diff --git a/git-am.sh b/git-am.sh index e7f008c7ba..9317b38935 100755 --- a/git-am.sh +++ b/git-am.sh @@ -444,12 +444,12 @@ else set x first= } - case "$arg" in - /*) - set "$@" "$arg" ;; - *) - set "$@" "$prefix$arg" ;; - esac + if is_absolute_path "$arg" + then + set "$@" "$arg" + else + set "$@" "$prefix$arg" + fi done shift fi -- cgit v1.2.3