internal void DoFileDiff(Rect rect, StatusListEntry info, bool enabled, bool selected, GitDiffWindow window)
        {
            RectOffset elementPadding = GetElementStyle().padding;
            float      iconSize       = GetElementStyle().fixedHeight - elementPadding.vertical;
            float      toggleSize     = styles.toggle.fixedHeight;

            Event  current     = Event.current;
            string projectPath = gitManager.ToProjectPath(info.LocalPath);
            string fileName    = info.Name;

            GitGUI.StartEnable(enabled);
            Rect  stageToggleRect = new Rect(rect.x + rect.width - toggleSize * 2, rect.y + (rect.height - toggleSize) * 0.5f, toggleSize, toggleSize);
            bool  canUnstage      = GitManager.CanUnstage(info.State);
            bool  canStage        = GitManager.CanStage(info.State);
            float maxPathSize     = rect.width - stageToggleRect.width - toggleSize - 21;

            if (current.type == EventType.Repaint)
            {
                (selected ? styles.diffElementSelected : GetElementStyle()).Draw(rect, false, false, false, false);
            }

            if (canStage && canUnstage)
            {
                maxPathSize -= stageToggleRect.width - 4;
                Rect stageWarnningRect = new Rect(stageToggleRect.x - stageToggleRect.width - 4, stageToggleRect.y, stageToggleRect.width, stageToggleRect.height);
                EditorGUIUtility.AddCursorRect(stageWarnningRect, MouseCursor.Link);
                if (GUI.Button(stageWarnningRect, GitGUI.IconContent("console.warnicon", "", "Unstaged changed pending. Stage to update index."), GUIStyle.none))
                {
                    string[] localPaths = gitManager.GetPathWithMeta(info.LocalPath).ToArray();
                    if (gitManager.Threading.IsFlagSet(GitSettingsJson.ThreadingType.Stage))
                    {
                        gitManager.AsyncStage(localPaths).onComplete += (o) => { window.Repaint(); };
                    }
                    else
                    {
                        GitCommands.Stage(gitManager.Repository, localPaths);
                        gitManager.MarkDirtyAuto(localPaths);
                    }
                    window.Repaint();
                }
            }

            if (current.type == EventType.Repaint)
            {
                Object asset = null;
                if (UniGitPathHelper.IsPathInAssetFolder(projectPath))
                {
                    asset = AssetDatabase.LoadAssetAtPath(UniGitPathHelper.IsMetaPath(projectPath) ? GitManager.AssetPathFromMeta(projectPath) : projectPath, typeof(Object));
                }

                string     extension  = Path.GetExtension(projectPath);
                GUIContent tmpContent = GUIContent.none;
                if (string.IsNullOrEmpty(extension))
                {
                    tmpContent = GitGUI.GetTempContent(styles.folderIcon, "Folder");
                }

                if (tmpContent.image == null)
                {
                    if (asset != null)
                    {
                        tmpContent = GitGUI.GetTempContent(string.Empty, AssetDatabase.GetCachedIcon(projectPath), asset.GetType().Name);
                    }
                    else
                    {
                        tmpContent = GitGUI.GetTempContent(styles.defaultAssetIcon, "Unknown Type");
                    }
                }

                float x = rect.x + elementPadding.left;
                GUI.Box(new Rect(x, rect.y + elementPadding.top, iconSize, iconSize), tmpContent, styles.assetIcon);
                x += iconSize + 8;

                styles.diffElementName.Draw(new Rect(x, rect.y + elementPadding.top + 2, rect.width - elementPadding.right - iconSize - rect.height, EditorGUIUtility.singleLineHeight), GitGUI.GetTempContent(fileName), false, selected, selected, false);

                x = rect.x + elementPadding.left + iconSize + 8;
                foreach (var diffTypeIcon in gitOverlay.GetDiffTypeIcons(info.State, false))
                {
                    GUI.Box(new Rect(x, rect.y + elementPadding.top + EditorGUIUtility.singleLineHeight + 4, 21, 21), diffTypeIcon, GUIStyle.none);
                    x += 25;
                }

                if (info.MetaChange == (MetaChangeEnum.Object | MetaChangeEnum.Meta))
                {
                    GUI.Box(new Rect(x, rect.y + elementPadding.top + EditorGUIUtility.singleLineHeight + 4, 21, 21), GitGUI.GetTempContent(gitOverlay.icons.objectIconSmall.image, "main asset file changed"), GUIStyle.none);
                    x += 25;
                }
                if (info.MetaChange.IsFlagSet(MetaChangeEnum.Meta))
                {
                    GUI.Box(new Rect(x, rect.y + elementPadding.top + EditorGUIUtility.singleLineHeight + 4, 21, 21), GitGUI.GetTempContent(gitOverlay.icons.metaIconSmall.image, ".meta file changed"), GUIStyle.none);
                    x += 25;
                }
                if (info.Flags.IsFlagSet(StatusEntryFlags.IsLfs))
                {
                    GUI.Box(new Rect(x, rect.y + elementPadding.top + EditorGUIUtility.singleLineHeight + 4, 21, 21), GitGUI.GetTempContent(gitOverlay.icons.lfsObjectIconSmall.image, "Lfs Object"), GUIStyle.none);
                    x += 25;
                }
                if (info.Flags.IsFlagSet(StatusEntryFlags.IsSubModule))
                {
                    GUI.Box(new Rect(x, rect.y + elementPadding.top + EditorGUIUtility.singleLineHeight + 4, 21, 21), GitGUI.GetTempContent(gitOverlay.icons.submoduleTagIconSmall.image, "Sub Module"), GUIStyle.none);
                    x += 25;
                }

                Vector2 pathSize = styles.diffElementPath.CalcSize(GitGUI.GetTempContent(projectPath));
                pathSize.x = Mathf.Min(pathSize.x, maxPathSize - x);

                Rect pathRect = new Rect(x, rect.y + elementPadding.top + EditorGUIUtility.singleLineHeight, pathSize.x, EditorGUIUtility.singleLineHeight * 2);

                styles.diffElementPath.Draw(pathRect, GitGUI.GetTempContent(projectPath), false, selected, selected, false);
                x += pathRect.width + 4;

                if (!enabled)
                {
                    GUI.Box(new Rect(x, rect.y + elementPadding.top + EditorGUIUtility.singleLineHeight + 4, 21, 21), GitGUI.GetTempSpinAnimatedTexture(), GUIStyle.none);
                    //spinning animation needs constant repaint
                    if (gitSettings.AnimationType.HasFlag(GitSettingsJson.AnimationTypeEnum.Loading))
                    {
                        window.Repaint();
                    }
                }
            }

            if (canUnstage || canStage)
            {
                EditorGUI.BeginChangeCheck();
                EditorGUIUtility.AddCursorRect(stageToggleRect, MouseCursor.Link);
                EditorGUI.Toggle(stageToggleRect, canUnstage, styles.toggle);
                if (EditorGUI.EndChangeCheck())
                {
                    bool updateFlag = false;
                    if (GitManager.CanStage(info.State))
                    {
                        string[] paths = gitManager.GetPathWithMeta(info.LocalPath).ToArray();
                        if (gitManager.Threading.IsFlagSet(GitSettingsJson.ThreadingType.Stage))
                        {
                            gitManager.AsyncStage(paths).onComplete += (o) => { window.Repaint(); };
                        }
                        else
                        {
                            GitCommands.Stage(gitManager.Repository, paths);
                            gitManager.MarkDirtyAuto(paths);
                        }
                        updateFlag = true;
                    }
                    else if (GitManager.CanUnstage(info.State))
                    {
                        string[] paths = gitManager.GetPathWithMeta(info.LocalPath).ToArray();
                        if (gitManager.Threading.IsFlagSet(GitSettingsJson.ThreadingType.Unstage))
                        {
                            gitManager.AsyncUnstage(paths).onComplete += (o) => { window.Repaint(); };
                        }
                        else
                        {
                            GitCommands.Unstage(gitManager.Repository, paths);
                            gitManager.MarkDirtyAuto(paths);
                        }
                        updateFlag = true;
                    }

                    if (updateFlag)
                    {
                        window.Repaint();
                        current.Use();
                    }
                }
            }
            GitGUI.EndEnable();
        }