Skip to content

Commit e3b6d5e

Browse files
committed
Update libgit2 to 96fb6a6
libgit2/libgit2@98eaf39...96fb6a6
1 parent 974ad99 commit e3b6d5e

File tree

9 files changed

+61
-3
lines changed

9 files changed

+61
-3
lines changed
857 KB
Binary file not shown.
-856 KB
Binary file not shown.

LibGit2Sharp/Core/GitDiff.cs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ internal class GitDiffLine
249249
public int NewLineNo;
250250
public int NumLines;
251251
public UIntPtr contentLen;
252+
public Int64 contentOffset;
252253
public IntPtr content;
253254
}
254255

@@ -274,4 +275,61 @@ enum GitDiffFormat
274275
GIT_DIFF_FORMAT_NAME_ONLY = 4, // < like git diff --name-only
275276
GIT_DIFF_FORMAT_NAME_STATUS = 5, // < like git diff --name-status
276277
}
278+
279+
[Flags]
280+
enum GitDiffFindFlags
281+
{
282+
GIT_DIFF_FIND_RENAMES = (1 << 0),
283+
// consider old side of modified for renames? (`--break-rewrites=N`)
284+
GIT_DIFF_FIND_RENAMES_FROM_REWRITES = (1 << 1),
285+
286+
// look for copies? (a la `--find-copies`)
287+
GIT_DIFF_FIND_COPIES = (1 << 2),
288+
// consider unmodified as copy sources? (`--find-copies-harder`)
289+
GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED = (1 << 3),
290+
291+
// mark large rewrites for split (`--break-rewrites=/M`)
292+
GIT_DIFF_FIND_REWRITES = (1 << 4),
293+
// actually split large rewrites into delete/add pairs
294+
GIT_DIFF_BREAK_REWRITES = (1 << 5),
295+
// mark rewrites for split and break into delete/add pairs
296+
GIT_DIFF_FIND_AND_BREAK_REWRITES =
297+
(GIT_DIFF_FIND_REWRITES | GIT_DIFF_BREAK_REWRITES),
298+
299+
// find renames/copies for untracked items in working directory
300+
GIT_DIFF_FIND_FOR_UNTRACKED = (1 << 6),
301+
302+
// turn on all finding features
303+
GIT_DIFF_FIND_ALL = (0x0ff),
304+
305+
// measure similarity ignoring leading whitespace (default)
306+
GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE = 0,
307+
// measure similarity ignoring all whitespace
308+
GIT_DIFF_FIND_IGNORE_WHITESPACE = (1 << 12),
309+
// measure similarity including all data
310+
GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE = (1 << 13),
311+
// measure similarity only by comparing SHAs (fast and cheap)
312+
GIT_DIFF_FIND_EXACT_MATCH_ONLY = (1 << 14),
313+
314+
// do not break rewrites unless they contribute to a rename
315+
GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY = (1 << 15),
316+
317+
// Remove any UNMODIFIED deltas after find_similar is done.
318+
GIT_DIFF_FIND_REMOVE_UNMODIFIED = (1 << 16),
319+
}
320+
321+
[StructLayout(LayoutKind.Sequential)]
322+
internal class GitDiffFindOptions
323+
{
324+
public uint Version = 1;
325+
public GitDiffFindFlags Flags;
326+
public UInt16 RenameThreshold;
327+
public UInt16 RenameFromRewriteThreshold;
328+
public UInt16 CopyThreshold;
329+
public UInt16 BreakRewriteThreshold;
330+
public UIntPtr RenameLimit;
331+
332+
// TODO
333+
public IntPtr SimilarityMetric;
334+
}
277335
}

LibGit2Sharp/Core/NativeDllName.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ namespace LibGit2Sharp.Core
22
{
33
internal static class NativeDllName
44
{
5-
public const string Name = "git2-98eaf39";
5+
public const string Name = "git2-96fb6a6";
66
}
77
}

LibGit2Sharp/libgit2_hash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
98eaf39a87164eeb284df5c0239c3a31dfb538e7
1+
96fb6a647f07e59b44551b23c000a44185cf5879

libgit2

Submodule libgit2 updated 2089 files

0 commit comments

Comments
 (0)