SRombauts / UEGitPlugin

Unreal Engine 5 Git LFS 2 Source Control Plugin (beta)
http://srombauts.github.io/UEGitPlugin
MIT License
808 stars 165 forks source link

Cannot view diff of some Git revisions #77

Open DJm00n opened 5 years ago

DJm00n commented 5 years ago

On big git projects sometimes ShortCommitId collission occurs because it is just 8 chars cropped CommitId instead of full SHA1: https://github.com/SRombauts/UE4GitPlugin/blob/46d94ff40f7b6bcc73639f9473eb03d63649747f/Source/GitSourceControl/Private/GitSourceControlUtils.cpp#L1154

Quick fix: https://github.com/SRombauts/UE4GitPlugin/blob/46d94ff40f7b6bcc73639f9473eb03d63649747f/Source/GitSourceControl/Private/GitSourceControlUtils.cpp#L1269

-               Parameters.Add(Revision->GetRevision());
+               Parameters.Add(Revision->CommitId);

Please consider removing commit id cropping at all because it can cause collisions in other places too.

SRombauts commented 5 years ago

hum, interesting, but I think I am limited by the Unreal Engine API, that expect a 32 bit int in some parts (I shall check that)

mastercoms commented 4 years ago

Is it possible to use git rev-list <commit-id> --count for CommitIdNumber? I'm not sure where it is used and if it's needed to use the actual commit hash. (Used in engine with GetCheckInIdentifier()).