|
| 1 | +/* |
| 2 | + * gitco.NET |
| 3 | + * Copyright © 2014-2022, Chris Warrick. |
| 4 | + * All rights reserved. |
| 5 | + * |
| 6 | + * Redistribution and use in source and binary forms, with or without |
| 7 | + * modification, are permitted provided that the following conditions are |
| 8 | + * met: |
| 9 | + * |
| 10 | + * 1. Redistributions of source code must retain the above copyright |
| 11 | + * notice, this list of conditions, and the following disclaimer. |
| 12 | + * |
| 13 | + * 2. Redistributions in binary form must reproduce the above copyright |
| 14 | + * notice, this list of conditions, and the following disclaimer in the |
| 15 | + * documentation and/or other materials provided with the distribution. |
| 16 | + * |
| 17 | + * 3. Neither the name of the author of this software nor the names of |
| 18 | + * contributors to this software may be used to endorse or promote |
| 19 | + * products derived from this software without specific prior written |
| 20 | + * consent. |
| 21 | + * |
| 22 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 23 | + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 24 | + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 25 | + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 26 | + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 27 | + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 28 | + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 29 | + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 30 | + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 31 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 32 | + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 33 | + */ |
| 34 | + |
1 | 35 | using System.Diagnostics; |
2 | 36 | using System.Globalization; |
3 | 37 | using System.Text; |
@@ -83,7 +117,7 @@ public static void PrintBranches(List<Branch> branches, string? filter) |
83 | 117 | Console.ResetColor(); |
84 | 118 | Console.WriteLine(); |
85 | 119 | } |
86 | | - } |
| 120 | + } |
87 | 121 |
|
88 | 122 | public static List<Branch> BuildBranchList(bool includeRemote) |
89 | 123 | { |
@@ -116,7 +150,7 @@ public static void Main(string[] args) |
116 | 150 | { |
117 | 151 | PrintHeader(filter); |
118 | 152 | PrintBranches(branches, filter); |
119 | | - |
| 153 | + |
120 | 154 | Console.ForegroundColor = ConsoleColor.DarkCyan; |
121 | 155 | Console.WriteLine( |
122 | 156 | "\nnumber → select M → master R → show remote branches /QUERY → filter"); |
@@ -214,7 +248,7 @@ private static void GitCheckout(string branchName) |
214 | 248 | proc.Start(); |
215 | 249 | proc.WaitForExit(); |
216 | 250 | var output = proc.StandardOutput.ReadToEnd() + proc.StandardError.ReadToEnd(); |
217 | | - Console.Write(output.Trim()); |
| 251 | + Console.WriteLine(output.Trim()); |
218 | 252 | Environment.ExitCode = proc.ExitCode; |
219 | 253 | } |
220 | 254 | } |
|
0 commit comments