mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
enhance: diff with LFS filtered files
This commit is contained in:
parent
63b42224f3
commit
cd2ecb109a
1 changed files with 9 additions and 11 deletions
|
@ -39,20 +39,18 @@ namespace SourceGit.Commands {
|
||||||
if (_result.IsLFS) {
|
if (_result.IsLFS) {
|
||||||
var ch = line[0];
|
var ch = line[0];
|
||||||
if (ch == '-') {
|
if (ch == '-') {
|
||||||
line = line.Substring(1);
|
if (line.StartsWith("-oid sha256:", StringComparison.Ordinal)) {
|
||||||
if (line.StartsWith("oid sha256:")) {
|
_result.LFSDiff.Old.Oid = line.Substring(12);
|
||||||
_result.LFSDiff.Old.Oid = line.Substring(11);
|
} else if (line.StartsWith("-size ", StringComparison.Ordinal)) {
|
||||||
} else if (line.StartsWith("size ")) {
|
_result.LFSDiff.Old.Size = long.Parse(line.Substring(6));
|
||||||
_result.LFSDiff.Old.Size = long.Parse(line.Substring(5));
|
|
||||||
}
|
}
|
||||||
} else if (ch == '+') {
|
} else if (ch == '+') {
|
||||||
line = line.Substring(1);
|
if (line.StartsWith("+oid sha256:", StringComparison.Ordinal)) {
|
||||||
if (line.StartsWith("oid sha256:")) {
|
_result.LFSDiff.New.Oid = line.Substring(12);
|
||||||
_result.LFSDiff.New.Oid = line.Substring(11);
|
} else if (line.StartsWith("+size ", StringComparison.Ordinal)) {
|
||||||
} else if (line.StartsWith("size ")) {
|
_result.LFSDiff.New.Size = long.Parse(line.Substring(6));
|
||||||
_result.LFSDiff.New.Size = long.Parse(line.Substring(5));
|
|
||||||
}
|
}
|
||||||
} else if (line.StartsWith(" size ")) {
|
} else if (line.StartsWith(" size ", StringComparison.Ordinal)) {
|
||||||
_result.LFSDiff.New.Size = _result.LFSDiff.Old.Size = long.Parse(line.Substring(6));
|
_result.LFSDiff.New.Size = _result.LFSDiff.Old.Size = long.Parse(line.Substring(6));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue