--- git-1.8.4/config.mak.uname	2013-08-23 23:38:43.000000000 +0400
+++ git-1.8.4m/config.mak.uname	2013-08-25 21:04:59.876953200 +0400
@@ -174,6 +174,31 @@
 	COMPAT_OBJS += compat/cygwin.o
 	FREAD_READS_DIRECTORIES = UnfortunatelyYes
 endif
+ifeq ($(uname_O),Msys)
+	ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4)
+		NO_D_TYPE_IN_DIRENT = YesPlease
+		NO_STRCASESTR = YesPlease
+		NO_SYMLINK_HEAD = YesPlease
+		NO_IPV6 = YesPlease
+		OLD_ICONV = UnfortunatelyYes
+		# There are conflicting reports about this.
+		# On some boxes NO_MMAP is needed, and not so elsewhere.
+		# Try commenting this out if you suspect MMAP is more efficient
+		NO_MMAP = YesPlease
+	else
+		NO_REGEX = UnfortunatelyYes
+	endif
+	HAVE_ALLOCA_H = YesPlease
+	NEEDS_LIBICONV = YesPlease
+	NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
+	NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
+	X = .exe
+	UNRELIABLE_FSTAT = UnfortunatelyYes
+	OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
+	MMAP_PREVENTS_DELETE = UnfortunatelyYes
+	COMPAT_OBJS += compat/win32/path-utils.o
+	FREAD_READS_DIRECTORIES = UnfortunatelyYes
+endif
 ifeq ($(uname_S),FreeBSD)
 	NEEDS_LIBICONV = YesPlease
 	OLD_ICONV = YesPlease
diff -Naur git-1.8.3.1/contrib/completion/git-completion.bash git-1.8.3.1m/contrib/completion/git-completion.bash
--- git-1.8.4/contrib/completion/git-completion.bash	2013-06-10 20:01:55.000000000 +0000
+++ git-1.8.4m/contrib/completion/git-completion.bash	2013-06-13 11:35:14.541992200 +0000
@@ -2760,3 +2760,7 @@
 if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
 __git_complete git.exe __git_main
 fi
+
+if [ Msys = "$(uname -o 2>/dev/null)" ]; then
+__git_complete git.exe __git_main
+fi
diff -Naur git-1.8.3.1/t/test-lib.sh git-1.8.3.1m/t/test-lib.sh
--- git-1.8.4/t/test-lib.sh	2013-06-10 20:01:55.000000000 +0000
+++ git-1.8.4m/t/test-lib.sh	2013-06-13 11:35:14.557617200 +0000
@@ -677,7 +677,7 @@
 	test_set_prereq NOT_CYGWIN
 	test_set_prereq SED_STRIPS_CR
 	;;
-*CYGWIN*)
+*CYGWIN* | *MSYS*)
 	test_set_prereq POSIXPERM
 	test_set_prereq EXECKEEPSPID
 	test_set_prereq NOT_MINGW
