private FileSystemTaskResult AddIndexEntryToProjection(GitIndexEntry data)
            {
                // Never want to project the common ancestor even if the skip worktree bit is on
                if ((data.MergeState != MergeStage.CommonAncestor && data.SkipWorktree) || data.MergeState == MergeStage.Yours)
                {
                    data.BuildingProjection_ParsePath();
                    this.projection.AddItemFromIndexEntry(data);
                }
                else
                {
                    data.ClearLastParent();
                }

                return(FileSystemTaskResult.Success);
            }
Esempio n. 2
0
        private void ParsePathForIndexEntry(GitIndexEntry indexEntry, string path, int replaceIndex)
        {
            byte[] pathBuffer = Encoding.UTF8.GetBytes(path);
            Buffer.BlockCopy(pathBuffer, 0, indexEntry.PathBuffer, 0, pathBuffer.Length);
            indexEntry.PathLength   = pathBuffer.Length;
            indexEntry.ReplaceIndex = replaceIndex;

            if (this.buildingNewProjection)
            {
                indexEntry.BuildingProjection_ParsePath();
            }
            else
            {
                indexEntry.BackgroundTask_ParsePath();
            }
        }