GitInternalSlash() 정적인 개인적인 메소드

Replaces any windows director separators (backslash) with /
static private GitInternalSlash ( byte bytes ) : byte[]
bytes byte
리턴 byte[]
예제 #1
0
 private TreeEntry FindMember(string s, byte slast)
 {
     return(FindMember(Repository.GitInternalSlash(Constants.encode(s)), slast, 0));
 }
예제 #2
0
        ///	<summary>
        /// Adds a new or existing file with the specified name to this tree.
        ///	Trees are added if necessary as the name may contain '/':s.
        ///	</summary>
        ///	<param name="name"> Name </param>
        ///	<returns>A <seealso cref="FileTreeEntry"/> for the added file.</returns>
        ///	<exception cref="IOException"></exception>

        public FileTreeEntry AddFile(string name)
        {
            return(AddFile(Repository.GitInternalSlash(Constants.encode(name)), 0));
        }
예제 #3
0
 ///	<summary>
 /// Adds a new or existing Tree with the specified name to this tree.
 ///	Trees are added if necessary as the name may contain '/':s.
 ///	</summary>
 ///	<param name="name"></param>
 ///	<returns>A <seealso cref="FileTreeEntry"/> for the added tree.</returns>
 ///	<exception cref="IOException"> </exception>
 public Tree AddTree(string name)
 {
     return(AddTree(Repository.GitInternalSlash(Constants.encode(name)), 0));
 }
예제 #4
0
 /// <summary>
 /// Look up an entry with the specified path.
 /// </summary>
 /// <param name="path"></param>
 /// <returns>Index entry for the path or null if not in index.</returns>
 public Entry GetEntry(string path)
 {
     byte[] val = Repository.GitInternalSlash(Constants.encode(path));
     return(_entries.Where(e => e.Key.SequenceEqual(val)).FirstOrDefault().Value);
 }