mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +02:00
Fixed handling of tags ending in ^{}
This commit is contained in:
parent
1c6e99d193
commit
d034dbc991
1 changed files with 24 additions and 8 deletions
|
@ -209,22 +209,38 @@ class GitManager
|
||||||
mProgressDeltas = 1.0f;
|
mProgressDeltas = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringView version = default;
|
StringView tag = default;
|
||||||
|
|
||||||
int refTagIdx = line.IndexOf("\trefs/tags/");
|
int refTagIdx = line.IndexOf("\trefs/tags/");
|
||||||
if (refTagIdx == 40)
|
if (refTagIdx == 40)
|
||||||
version = line.Substring(40 + "\trefs/tags/".Length);
|
tag = line.Substring(40 + "\trefs/tags/".Length);
|
||||||
|
|
||||||
if ((line.Length == 45) && (line.EndsWith("HEAD")))
|
if ((line.Length == 45) && (line.EndsWith("HEAD")))
|
||||||
version = "HEAD";
|
tag = "HEAD";
|
||||||
|
|
||||||
if (!version.IsEmpty)
|
if (!tag.IsEmpty)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
StringView hash = line.Substring(0, 40);
|
||||||
|
|
||||||
|
if (tag.EndsWith("^{}"))
|
||||||
{
|
{
|
||||||
TagInfo tagInfo = new .();
|
tag.RemoveFromEnd(3);
|
||||||
tagInfo.mHash = new .(line, 0, 40);
|
if (!mTagInfos.IsEmpty)
|
||||||
tagInfo.mTag = new .(version);
|
{
|
||||||
mTagInfos.Add(tagInfo);
|
var lastTag = mTagInfos.Back;
|
||||||
|
if (lastTag.mTag == tag)
|
||||||
|
{
|
||||||
|
lastTag.mHash.Set(hash);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TagInfo tagInfo = new .();
|
||||||
|
tagInfo.mHash = new .(hash);
|
||||||
|
tagInfo.mTag = new .(tag);
|
||||||
|
mTagInfos.Add(tagInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue