summaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2010-09-30 14:24:07 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2010-10-03 23:31:59 +0100
commit5e9677cbdf1840836e22d9cf23198de34877e283 (patch)
tree449c3b8f4b22f197f4ef70ffcda99b302bcb8c7c /git-am.sh
parent36e035f5dcd214039d5ea96c29de110ae7435137 (diff)
downloadgit-5e9677cbdf1840836e22d9cf23198de34877e283.tar.gz
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 <j6t@kdbg.org> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh12
1 files changed, 6 insertions, 6 deletions
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