@@ -97,18 +97,6 @@ public static int GetHeight(LibGit2Context context, Func<Commit, bool>? continue
9797 return GetCommitHeight ( context . Commit , tracker , continueStepping ) ;
9898 }
9999
100- /// <summary>
101- /// Takes the first 4 bytes of a commit ID (i.e. first 8 characters of its hex-encoded SHA)
102- /// and returns them as an integer.
103- /// </summary>
104- /// <param name="commit">The commit to identify with an integer.</param>
105- /// <returns>The integer which identifies a commit.</returns>
106- public static int GetTruncatedCommitIdAsInt32 ( this Commit commit )
107- {
108- Requires . NotNull ( commit , nameof ( commit ) ) ;
109- return BitConverter . ToInt32 ( commit . Id . RawId , 0 ) ;
110- }
111-
112100 /// <summary>
113101 /// Takes the first 2 bytes of a commit ID (i.e. first 4 characters of its hex-encoded SHA)
114102 /// and returns them as an 16-bit unsigned integer.
@@ -121,20 +109,6 @@ public static ushort GetTruncatedCommitIdAsUInt16(this Commit commit)
121109 return BitConverter . ToUInt16 ( commit . Id . RawId , 0 ) ;
122110 }
123111
124- /// <summary>
125- /// Looks up a commit by an integer that captures the first for bytes of its ID.
126- /// </summary>
127- /// <param name="repo">The repo to search for a matching commit.</param>
128- /// <param name="truncatedId">The value returned from <see cref="GetTruncatedCommitIdAsInt32(Commit)"/>.</param>
129- /// <returns>A matching commit.</returns>
130- public static Commit GetCommitFromTruncatedIdInteger ( this Repository repo , int truncatedId )
131- {
132- Requires . NotNull ( repo , nameof ( repo ) ) ;
133-
134- byte [ ] rawId = BitConverter . GetBytes ( truncatedId ) ;
135- return repo . Lookup < Commit > ( EncodeAsHex ( rawId ) ) ;
136- }
137-
138112 /// <summary>
139113 /// Returns the repository that <paramref name="repositoryMember"/> belongs to.
140114 /// </summary>
0 commit comments