Re: [JGIT PATCH 03/22] Added a class Project which represents a project directory and it's repository.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



lördagen den 10 maj 2008 15.00.21 skrev Florian Koeberle:
> Signed-off-by: Florian Koeberle <florianskarten@xxxxxx>
> +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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux