Skip to content

Commit a34cbd0

Browse files
committed
v1.0.0: Stable release with tests and more compatibility
1 parent 737e578 commit a34cbd0

4 files changed

Lines changed: 52 additions & 7 deletions

File tree

gitco.NET.Tests/ExtractBranchListFromGitOutputTests.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* gitco.NET
3+
* Copyright © 2014-2022, Chris Warrick. All rights reserved.
4+
* Licensed under the 3-clause BSD license. See /LICENSE for details.
5+
*/
6+
17
namespace gitco.NET.Tests;
28

39
public class ExtractBranchListFromGitOutputTests
@@ -107,4 +113,4 @@ public void Remotes_Folders_Duplicates()
107113

108114
Assert.Equal(expectedOutput, actualOutput);
109115
}
110-
}
116+
}

gitco.NET.Tests/FilterAndNumberBranchesTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
using System.Diagnostics;
1+
/*
2+
* gitco.NET
3+
* Copyright © 2014-2022, Chris Warrick. All rights reserved.
4+
* Licensed under the 3-clause BSD license. See /LICENSE for details.
5+
*/
26

37
namespace gitco.NET.Tests;
48

gitco.NET/Program.cs

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
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+
135
using System.Diagnostics;
236
using System.Globalization;
337
using System.Text;
@@ -83,7 +117,7 @@ public static void PrintBranches(List<Branch> branches, string? filter)
83117
Console.ResetColor();
84118
Console.WriteLine();
85119
}
86-
}
120+
}
87121

88122
public static List<Branch> BuildBranchList(bool includeRemote)
89123
{
@@ -116,7 +150,7 @@ public static void Main(string[] args)
116150
{
117151
PrintHeader(filter);
118152
PrintBranches(branches, filter);
119-
153+
120154
Console.ForegroundColor = ConsoleColor.DarkCyan;
121155
Console.WriteLine(
122156
"\nnumber → select M → master R → show remote branches /QUERY → filter");
@@ -214,7 +248,7 @@ private static void GitCheckout(string branchName)
214248
proc.Start();
215249
proc.WaitForExit();
216250
var output = proc.StandardOutput.ReadToEnd() + proc.StandardError.ReadToEnd();
217-
Console.Write(output.Trim());
251+
Console.WriteLine(output.Trim());
218252
Environment.ExitCode = proc.ExitCode;
219253
}
220254
}

gitco.NET/gitco.NET.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
<PropertyGroup>
44
<AssemblyName>gitco</AssemblyName>
55
<Description>A small .NET app to checkout a desired git branch.</Description>
6-
<Version>0.1.0</Version>
7-
<AssemblyVersion>0.1.0</AssemblyVersion>
6+
<Version>1.0.0</Version>
7+
<AssemblyVersion>1.0.0</AssemblyVersion>
88
<Authors>Chris Warrick</Authors>
99
<Copyright>Copyright (C) 2014-2022, Chris Warrick. All rights reserved. Licensed under the 3-clause BSD license.</Copyright>
1010
<OutputType>Exe</OutputType>
1111
<TargetFramework>net6.0</TargetFramework>
1212
<ImplicitUsings>enable</ImplicitUsings>
13+
<LangVersion>10.0</LangVersion>
1314
<Nullable>enable</Nullable>
1415
<PublishSingleFile>true</PublishSingleFile>
1516
<SelfContained>false</SelfContained>

0 commit comments

Comments
 (0)