Open Danielku15 opened 12 years ago
The GetDirectory() method of the ObjectDirectory class is set as internal: https://github.com/mono/ngit/blob/master/NGit/NGit.Storage.File/ObjectDirectory.cs#L151
But it should be public: http://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java#n172
Also applies for fileFor(AnyObjectId).
I need this methods for some tasks.
I am currently using this (very very dirty) Workaround:
string path = objectDirectory.ToString(); path = path.Substring(16, path.Length - 17);
ToString() delivers "ObjectDirectory[" + GetDirectory() + "]". That way it's possible to extract the path.
The GetDirectory() method of the ObjectDirectory class is set as internal: https://github.com/mono/ngit/blob/master/NGit/NGit.Storage.File/ObjectDirectory.cs#L151
But it should be public: http://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java#n172
Also applies for fileFor(AnyObjectId).
I need this methods for some tasks.
I am currently using this (very very dirty) Workaround:
string path = objectDirectory.ToString(); path = path.Substring(16, path.Length - 17);
ToString() delivers "ObjectDirectory[" + GetDirectory() + "]". That way it's possible to extract the path.