Thread (2 messages) 2 messages, 2 authors, 2016-06-15

Re: [PATCH] git-am: fix detection of absolute paths for windows

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:49:40

Possibly related (same subject, not in this thread)

On Donnerstag, 30. September 2010, Pat Thoyts wrote:
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.
Thanks for tackling this!
quoted hunk ↗ jump to hunk
@@ -209,5 +209,20 @@ case $(uname -s) in
 	find () {
 		/usr/bin/find "$@"
 	}
+	is_absolute_path () {
+		case "$1" in
+		/* | ?:* | \\\\*)
Absolute paths can also start with a backslash, and UNC paths can start with 
double-slash. Therefore, this should be:

		[/\\]* | [A-Za-z]:*)
quoted hunk ↗ jump to hunk
+			return 0 ;;
+		esac
+		return 1
+	}
-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help