8000 Optimize import directives · SinghVarun/libgit2sharp@930f63c · GitHub
[go: up one dir, main page]

Skip to content

Commit 930f63c

Browse files
committed
Optimize import directives
1 parent fc59d2e commit 930f63c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+53
-169
lines changed

LibGit2Sharp.Tests/ArchiveTarFixture.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using System.IO;
32
using System.Text;
43
using LibGit2Sharp.Tests.TestHelpers;

LibGit2Sharp.Tests/CherryPickFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System.IO;
1+
using System;
2+
using System.IO;
23
using System.Linq;
34
using LibGit2Sharp.Tests.TestHelpers;
45
using Xunit;
56
using Xunit.Extensions;
6-
using System;
77

88
namespace LibGit2Sharp.Tests
99
{

LibGit2Sharp.Tests/IndexFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,12 @@ public void RetrievingAssumedUnchangedMarkedIndexEntries()
471471
{
472472
var path = SandboxAssumeUnchangedTestRepo();
473473
using (var repo = new Repository(path))
474-
{
474+
{
475475
var regularFile = repo.Index["hello.txt"];
476476
Assert.False(regularFile.AssumeUnchanged);
477477

478478
var assumeUnchangedFile = repo.Index["world.txt"];
479-
Assert.True(assumeUnchangedFile.AssumeUnchanged);
479+
Assert.True(assumeUnchangedFile.AssumeUnchanged);
480480
}
481481
}
482482

LibGit2Sharp.Tests/MergeFixture.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Diagnostics;
32
using System.IO;
43
using System.Linq;
54
using LibGit2Sharp.Tests.TestHelpers;

LibGit2Sharp.Tests/PushFixture.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.IO;
33
using System.Linq;
4+
using LibGit2Sharp.Handlers;
45
using LibGit2Sharp.Tests.TestHelpers;
56
using Xunit;
67

@@ -62,7 +63,7 @@ private void AssertPush(Action<IRepository> push)
6263
public void CanPushABranchTrackingAnUpstreamBranch()
6364
{
6465
bool packBuilderCalled = false;
65-
Handlers.PackBuilderProgressHandler packBuilderCb = (x, y, z) => { packBuilderCalled = true; return true; };
66+
PackBuilderProgressHandler packBuilderCb = (x, y, z) => { packBuilderCalled = true; return true; };
6667

6768
AssertPush(repo => repo.Network.Push(repo.Head));
6869
AssertPush(repo => repo.Network.Push(repo.Branches["master"]));

LibGit2Sharp.Tests/RefSpecFixture.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.Linq;
1+
using System.Linq;
32
using LibGit2Sharp.Tests.TestHelpers;
43
using Xunit;
54
using Xunit.Extensions;

LibGit2Sharp.Tests/RevertFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
using System;
12
using System.IO;
23
using System.Linq;
34
using LibGit2Sharp.Tests.TestHelpers;
45
using Xunit;
56
using Xunit.Extensions;
6-
using System;
77

88
namespace LibGit2Sharp.Tests
99
{

LibGit2Sharp.Tests/ShadowCopyFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.IO;
33
using System.Reflection;
44
using System.Security;

LibGit2Sharp.Tests/SmartSubtransportFixture.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using System.IO;
4-
using System.Linq;
54
using System.Net;
65
using System.Net.Security;
76
using LibGit2Sharp.Tests.TestHelpers;

LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Diagnostics;
44
using System.Globalization;

LibGit2Sharp.Tests/TestHelpers/SkippableFactAttribute.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Xml;
5+
using Xunit;
6+
using Xunit.Extensions;
7+
using Xunit.Sdk;
28
//**********************************************************************
39
//* This file is based on the DynamicSkipExample.cs in xUnit which is
410
//* provided under the following Ms-PL license:
@@ -58,12 +64,6 @@
5864
//* portion of the software in compiled or object code form, you may
5965
//* only do so under a license that complies with this license.
6066
//**********************************************************************
61-
using System.Collections.Generic;
62-
using System.Linq;
63-
using System.Xml;
64-
using Xunit;
65-
using Xunit.Extensions;
66-
using Xunit.Sdk;
6767

6868
namespace LibGit2Sharp.Tests.TestHelpers
6969
{

LibGit2Sharp/BlameOptions.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
2-
3-
namespace LibGit2Sharp
1+
namespace LibGit2Sharp
42
{
53
/// <summary>
64
/// Strategy used for blaming.

LibGit2Sharp/BlobExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.IO;
1+
using System.IO;
32
using System.Text;
43
using LibGit2Sharp.Core;
54

LibGit2Sharp/Branch.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Globalization;
33
using LibGit2Sharp.Core;
4-
using LibGit2Sharp.Handlers;
54

65
namespace LibGit2Sharp
76
{

LibGit2Sharp/BranchCollectionExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using LibGit2Sharp.Core;
2-
using System;
32

43
namespace LibGit2Sharp
54
{

LibGit2Sharp/BranchTrackingDetails.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
2-
3-
namespace LibGit2Sharp
1+
namespace LibGit2Sharp
42
{
53
/// <summary>
64
/// Tracking information for a <see cref="Branch"/>

LibGit2Sharp/CheckoutFileConflictStrategy.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
6-
namespace LibGit2Sharp
1+
namespace LibGit2Sharp
72
{
83
/// <summary>
94
/// Enum specifying what content checkout should write to disk

LibGit2Sharp/CheckoutNotificationOptions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using LibGit2Sharp.Handlers;
32

43
namespace LibGit2Sharp
54
{

LibGit2Sharp/CherryPickResult.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
4-
namespace LibGit2Sharp
1+
namespace LibGit2Sharp
52
{
63
/// <summary>
74
/// Class to report the result of a cherry picked.

LibGit2Sharp/CloneOptions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using LibGit2Sharp.Core;
1+
using LibGit2Sharp.Core;
32
using LibGit2Sharp.Handlers;
43

54
namespace LibGit2Sharp

LibGit2Sharp/CommitLog.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Collections;
33
using System.Collections.Generic;
4-
using System.Globalization;
54
using System.Linq;
65
using LibGit2Sharp.Core;
76
using LibGit2Sharp.Core.Handles;

LibGit2Sharp/CommitOptions.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
6-
namespace LibGit2Sharp
1+
namespace LibGit2Sharp
72
{
83
/// <summary>
94
/// Provides optional additional information to commit creation.

LibGit2Sharp/CompareOptions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System;
2-
31
namespace LibGit2Sharp
42
{
53
/// <summary>

LibGit2Sharp/Configuration.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections;
23
using System.Collections.Generic;
34
using System.Globalization;
45
using System.IO;
@@ -299,7 +300,7 @@ public virtual IEnumerator<ConfigurationEntry<string>> GetEnumerator()
299300
return BuildConfigEntries().GetEnumerator();
300301
}
301302

302-
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
303+
IEnumerator IEnumerable.GetEnumerator()
303304
{
304305
return ((IEnumerable<ConfigurationEntry<string>>)this).GetEnumerator();
305306
}

LibGit2Sharp/Core/Ensure.cs

Lines changed: 1 addition & 2 deletions
Original file line numb 741A erDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
using System;
2-
using System.Linq;
3-
using System.Collections;
42
using System.Collections.Generic;
53
using System.Diagnostics;
64
using System.Globalization;
5+
using System.Linq;
76

87
namespace LibGit2Sharp.Core
98
{

LibGit2Sharp/Core/FilePathMarshaler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Globalization;
33
using System.Runtime.InteropServices;
4-
using System.Text;
54

65
namespace LibGit2Sharp.Core
76
{

LibGit2Sharp/Core/GitCheckoutOptsWrapper.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
52

63
namespace LibGit2Sharp.Core
74
{

LibGit2Sharp/Core/GitCherryPickOptions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.Runtime.InteropServices;
1+
using System.Runtime.InteropServices;
32

43
namespace LibGit2Sharp.Core
54
{

LibGit2Sharp/Core/GitPushOptions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.Runtime.InteropServices;
1+
using System.Runtime.InteropServices;
32

43
namespace LibGit2Sharp.Core
54
{

LibGit2Sharp/Core/GitStatusEntry.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
42
using System.Runtime.InteropServices;
5-
using System.Text;
63

74
namespace LibGit2Sharp.Core
85
{

LibGit2Sharp/Core/GitStatusOptions.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
42
using System.Runtime.InteropServices;
5-
using System.Text;
63

74
namespace LibGit2Sharp.Core
85
{

LibGit2Sharp/Core/GitStrArray.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.Runtime.InteropServices;
4-
using System.Text;
53

64
namespace LibGit2Sharp.Core
75
{

LibGit2Sharp/Core/GitStrArrayNative.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.Runtime.InteropServices;
43

54
namespace LibGit2Sharp.Core

LibGit2Sharp/Core/Handles/GitAnnotatedCommitHandle.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Runtime.InteropServices;
2-
31
namespace LibGit2Sharp.Core.Handles
42
{
53
internal class GitAnnotatedCommitHandle : SafeHandleBase

LibGit2Sharp/Core/Handles/GitConfigEntryHandle.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Runtime.InteropServices;
2-
31
namespace LibGit2Sharp.Core.Handles
42
{
53
internal class GitConfigEntryHandle : NotOwnedSafeHandleBase

LibGit2Sharp/Core/Handles/GitErrorSafeHandle.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Runtime.InteropServices;
32

43
namespace LibGit2Sharp.Core.Handles
54
{

LibGit2Sharp/Core/Handles/IndexEntrySafeHandle.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System.Runtime.InteropServices;
2-
3-
namespace LibGit2Sharp.Core.Handles
1+
namespace LibGit2Sharp.Core.Handles
42
{
53
internal class IndexEntrySafeHandle : NotOwnedSafeHandleBase
64
{

LibGit2Sharp/Core/Handles/IndexNameEntrySafeHandle.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System.Runtime.InteropServices;
2-
3-
namespace LibGit2Sharp.Core.Handles
1+
namespace LibGit2Sharp.Core.Handles
42
{
53
internal class IndexNameEntrySafeHandle : NotOwnedSafeHandleBase
64
{

LibGit2Sharp/Core/Handles/IndexReucEntrySafeHandle.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System.Runtime.InteropServices;
2-
3-
namespace LibGit2Sharp.Core.Handles
1+
namespace LibGit2Sharp.Core.Handles
42
{
53
internal class IndexReucEntrySafeHandle : NotOwnedSafeHandleBase
64
{

LibGit2Sharp/Core/Handles/OidSafeHandle.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Runtime.InteropServices;
1+
using System;
2+
using System.Runtime.InteropServices;
23

34
namespace LibGit2Sharp.Core.Handles
45
{
@@ -9,7 +10,7 @@ internal class OidSafeHandle : NotOwnedSafeHandleBase
910
return IsInvalid ? null : (GitOid?)MarshalAsGitOid(handle);
1011
}
1112

12-
private static GitOid MarshalAsGitOid(System.IntPtr data)
13+
private static GitOid MarshalAsGitOid(IntPtr data)
1314
{
1415
var gitOid = new GitOid { Id = new byte[GitOid.Size] };
1516
Marshal.Copy(data, gitOid.Id, 0, GitOid.Size);

LibGit2Sharp/Core/Handles/StatusListSafeHandle.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
6-
namespace LibGit2Sharp.Core.Handles
1+
namespace LibGit2Sharp.Core.Handles
72
{
83
internal class StatusListSafeHandle : SafeHandleBase
94
{

LibGit2Sharp/Credentials.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using LibGit2Sharp.Core;
32

43
namespace LibGit2Sharp
54
{

LibGit2Sharp/Diff.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Text;
66
using LibGit2Sharp.Core;
77
using LibGit2Sharp.Core.Handles;
8-
using Environment = System.Environment;
98

109
namespace LibGit2Sharp
1110
{

LibGit2Sharp/FetchOptions.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System;
2-
using LibGit2Sharp.Handlers;
3-
4-
namespace LibGit2Sharp
1+
namespace LibGit2Sharp
52
{
63
/// <summary>
74
/// Collection of parameters controlling Fetch behavior.

LibGit2Sharp/GitObjectMetadata.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using LibGit2Sharp.Core;
2-
using System;
32

43
namespace LibGit2Sharp
54
{

0 commit comments

Comments
 (0)
0