[EGIT PATCH 06/10] Rename the gitDir fields to indicate they refer to another dir than the default

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

 



---
 .../src/org/spearce/jgit/pgm/ReceivePack.java      |   10 +++++-----
 .../src/org/spearce/jgit/pgm/UploadPack.java       |   10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/ReceivePack.java b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/ReceivePack.java
index 579f893..7c72e2c 100644
--- a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/ReceivePack.java
+++ b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/ReceivePack.java
@@ -45,7 +45,7 @@
 @Command(common = false, usage = "Server side backend for 'jgit push'")
 class ReceivePack extends TextBuiltin {
 	@Argument(index = 0, required = true, metaVar = "DIRECTORY", usage = "Repository to receive into")
-	File gitdir;
+	File newGitdir;
 
 	@Override
 	protected final boolean requiresRepository() {
@@ -56,11 +56,11 @@ protected final boolean requiresRepository() {
 	protected void run() throws Exception {
 		final org.spearce.jgit.transport.ReceivePack rp;
 
-		if (new File(gitdir, ".git").isDirectory())
-			gitdir = new File(gitdir, ".git");
-		db = new Repository(gitdir);
+		if (new File(newGitdir, ".git").isDirectory())
+			newGitdir = new File(newGitdir, ".git");
+		db = new Repository(newGitdir);
 		if (!db.getObjectsDirectory().isDirectory())
-			throw die("'" + gitdir.getPath() + "' not a git repository");
+			throw die("'" + newGitdir.getPath() + "' not a git repository");
 		rp = new org.spearce.jgit.transport.ReceivePack(db);
 		rp.receive(System.in, System.out, System.err);
 	}
diff --git a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/UploadPack.java b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/UploadPack.java
index d6f6d7c..b9e25d0 100644
--- a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/UploadPack.java
+++ b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/UploadPack.java
@@ -45,7 +45,7 @@
 @Command(common = false, usage = "Server side backend for 'jgit fetch'")
 class UploadPack extends TextBuiltin {
 	@Argument(index = 0, required = true, metaVar = "DIRECTORY", usage = "Repository to read from")
-	File gitdir;
+	File newGitdir;
 
 	@Override
 	protected final boolean requiresRepository() {
@@ -56,11 +56,11 @@ protected final boolean requiresRepository() {
 	protected void run() throws Exception {
 		final org.spearce.jgit.transport.UploadPack rp;
 
-		if (new File(gitdir, ".git").isDirectory())
-			gitdir = new File(gitdir, ".git");
-		db = new Repository(gitdir);
+		if (new File(newGitdir, ".git").isDirectory())
+			newGitdir = new File(newGitdir, ".git");
+		db = new Repository(newGitdir);
 		if (!db.getObjectsDirectory().isDirectory())
-			throw die("'" + gitdir.getPath() + "' not a git repository");
+			throw die("'" + newGitdir.getPath() + "' not a git repository");
 		rp = new org.spearce.jgit.transport.UploadPack(db);
 		rp.upload(System.in, System.out, System.err);
 	}
-- 
1.6.1.285.g35d8b

--
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