GitSharp.Core.DirectoryCache.DirCacheEntry.getStage C# (CSharp) Метод

getStage() публичный Метод

Get the stage of this entry. Entries have one of 4 possible stages: 0-3.
public getStage ( ) : int
Результат int
        public int getStage()
        {
            return (int)((uint)(_info[_infoOffset + PFlags]) >> 4) & 0x3;
        }

Usage Example

Пример #1
0
        private void Resort()
        {
            Array.Sort(Entries, 0, EntryCnt, new GenericComparer <DirCacheEntry>(DirCache.EntryComparer));

            for (int entryIdx = 1; entryIdx < EntryCnt; entryIdx++)
            {
                DirCacheEntry pe = Entries[entryIdx - 1];
                DirCacheEntry ce = Entries[entryIdx];
                int           cr = DirCache.Compare(pe, ce);
                if (cr == 0)
                {
                    // Same file path; we can only allow this if the stages
                    // are 1-3 and no 0 exists.
                    //
                    int peStage = pe.getStage();
                    int ceStage = ce.getStage();

                    if (peStage == ceStage)
                    {
                        throw Bad(ce, "Duplicate stages not allowed");
                    }

                    if (peStage == 0 || ceStage == 0)
                    {
                        throw Bad(ce, "Mixed stages not allowed");
                    }
                }
            }

            _sorted = true;
        }
All Usage Examples Of GitSharp.Core.DirectoryCache.DirCacheEntry::getStage