Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

ObjectDirectory.GetDirectory() should be Public #39

Open
Danielku15 opened this issue Aug 13, 2012 · 0 comments
Open

ObjectDirectory.GetDirectory() should be Public #39

Danielku15 opened this issue Aug 13, 2012 · 0 comments

Comments

@Danielku15
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant