From: Robin Rosenberg Date: Sat, 10 May 2008 20:45:16 GMT Subject: Re: [JGIT PATCH 03/22] Added a class Project which represents a project directory and it's repository. Message-ID: <200805102245.16575.robin.rosenberg.lists@dewire.com> In-Reply-To: <1210424440-13886-4-git-send-email-florianskarten@web.de> lördagen den 10 maj 2008 15.00.21 skrev Florian Koeberle: > Signed-off-by: Florian Koeberle > +public class GitPathConstants { > + /** > + * The name of the repository directory in the project directory. > + */ > + public static final String REPOSITORY_DIRECTORY_NAME = ".git"; > + > + /** > + * Contains the name of the objects directory in the repository directory. > + */ > + public static final String OBJECTS_DIRECTORY_NAME = "objects"; > + > + /** > + * Contains the name of the refs directory in the repository directory. > + */ > + public static final String REFS_DIRECTORY_NAME = "refs"; > + > + /** > + * Contains the name of the HEAD file in the repository directory. > + */ > + public static final String HEAD_FILE_NAME = "HEAD"; > + > +} Some of these we have as constansts in the Constants class. We should use them and put the new ones there too. I think we have a few literals of our own that should go there tool. Don't be afraid of proposing changes to other people's code. We don't territories. > diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/Project.java b/org.spearce.jgit/src/org/spearce/jgit/lib/Project.java > new file mode 100644 > index 0000000..6e72486 > --- /dev/null > +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/Project.java This term is also used by Eclipse and has a different meaning. Could we use something else, maybe WorkTree? > +public class ProjectFactory { Let Repository be the factory. > + } catch (RuntimeException e) { > + repository.close(); > + throw e; > + } catch (IOException e) { > + repository.close(); > + throw e; > + } Why not finally() handling all Exceptions? -- robin