OSDN Git Service

Fix Issue 236: CGit::GetRemoteList uses bad regular expression
authorFrank Li <lznuaa@gmail.com>
Tue, 1 Dec 2009 08:17:24 +0000 (16:17 +0800)
committerFrank Li <lznuaa@gmail.com>
Tue, 1 Dec 2009 08:17:24 +0000 (16:17 +0800)
CGit::GetRemoteList uses bad regular expression. This causes matches that
are not remote.blah.url (for example: svn-remote.blah.url will also match).
Here's a patch to fix it.

Fixed by Basic.talk@gmail.com

Signed-off-by: Frank Li <lznuaa@gmail.com>
src/Git/Git.cpp

index 591878c..1012e22 100644 (file)
@@ -747,7 +747,7 @@ int CGit::GetRemoteList(STRING_VECTOR &list)
 {\r
        int ret;\r
        CString cmd,output;\r
-       cmd=_T("git.exe config  --get-regexp remote.*.url");\r
+       cmd=_T("git.exe config  --get-regexp \"^^remote[.].*[.]url\"");\r
        ret=g_Git.Run(cmd,&output,CP_UTF8);\r
        if(!ret)\r
        {\r