File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Assets/Plugins/CandyCoded.GitStatus/Scripts/CustomEditor Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
#if UNITY_EDITOR
4
4
using System ;
5
+ using System . Collections . Generic ;
6
+ using System . IO ;
5
7
using System . Diagnostics ;
6
8
using System . Linq ;
7
9
using Debug = UnityEngine . Debug ;
@@ -48,10 +50,18 @@ public static string[] Branches()
48
50
CreateNoWindow = true
49
51
} ) ;
50
52
51
- return process ? . StandardOutput
52
- . ReadToEnd ( )
53
- . Split ( Environment . NewLine . ToCharArray ( ) , StringSplitOptions . RemoveEmptyEntries )
54
- . ToArray ( ) ;
53
+ var branches = new List < string > ( ) ;
54
+
55
+ var stringReader = new StringReader ( process ? . StandardOutput . ReadToEnd ( ) ) ;
56
+
57
+ while ( stringReader . ReadLine ( ) is string line )
58
+ {
59
+
60
+ branches . Add ( line . Trim ( '\' ' ) ) ;
61
+
62
+ }
63
+
64
+ return branches . ToArray ( ) ;
55
65
56
66
}
57
67
You can’t perform that action at this time.
0 commit comments