Exemplo n.º 1
0
 private IndexReucEntry this[int index]
 {
     get
     {
         IndexReucEntrySafeHandle entryHandle = Proxy.git_index_reuc_get_byindex(repo.Index.Handle, (UIntPtr)index);
         return(IndexReucEntry.BuildFromPtr(entryHandle));
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the <see cref="IndexReucEntry"/> with the specified relative path.
        /// </summary>
        public virtual IndexReucEntry this[string path]
        {
            get
            {
                Ensure.ArgumentNotNullOrEmptyString(path, "path");

                IndexReucEntrySafeHandle entryHandle = Proxy.git_index_reuc_get_bypath(repo.Index.Handle, path);
                return(IndexReucEntry.BuildFromPtr(entryHandle));
            }
        }
Exemplo n.º 3
0
        internal static IndexReucEntry BuildFromPtr(IndexReucEntrySafeHandle handle)
        {
            if (handle == null || handle.IsZero)
            {
                return(null);
            }

            GitIndexReucEntry entry = handle.MarshalAsGitIndexReucEntry();

            FilePath path = LaxFilePathMarshaler.FromNative(entry.Path);

            return(new IndexReucEntry
            {
                Path = path.Native,
                AncestorId = entry.AncestorId,
                AncestorMode = (Mode)entry.AncestorMode,
                OurId = entry.OurId,
                OurMode = (Mode)entry.OurMode,
                TheirId = entry.TheirId,
                TheirMode = (Mode)entry.TheirMode,
            });
        }