From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: spearce@sparce.org
Cc: git@vger.kernel.org, Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: [EGIT PATCH 06/10] Rename the gitDir fields to indicate they refer to another dir than the default
Date: Mon, 16 Mar 2009 21:14:39 +0100 [thread overview]
Message-ID: <1237234483-3405-7-git-send-email-robin.rosenberg@dewire.com> (raw)
In-Reply-To: <1237234483-3405-6-git-send-email-robin.rosenberg@dewire.com>
---
.../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
next prev parent reply other threads:[~2009-03-16 20:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-16 20:14 [EGIT PATCH 00/10] JGit cleanups Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 01/10] Require javadoc on protected methods in jgit core Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 02/10] Rename the objectsUrl in the nested HttpObjectDB to Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 03/10] Rename variables that hides others with different content in FetchProcess Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 04/10] Rename a parameter i PackWriter that hides another with the same name Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 05/10] Rename fields to avoid hiding of field names in ReadTreeTest Robin Rosenberg
2009-03-16 20:14 ` Robin Rosenberg [this message]
2009-03-16 20:14 ` [EGIT PATCH 07/10] Rename a parameter in PushProcessTest that hides another Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 08/10] Drop unused end parameters in hunk parsing code Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 09/10] Drop unused File arguments in IndexTreeWalker and WorkdirCheckout Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 10/10] Drop an effectively unused parameter in IndexTreeWalker Robin Rosenberg
2009-03-16 20:39 ` [EGIT PATCH 08/10] Drop unused end parameters in hunk parsing code Shawn O. Pearce
2009-03-16 20:25 ` [EGIT PATCH 02/10] Rename the objectsUrl in the nested HttpObjectDB to Shawn O. Pearce
2009-03-16 21:25 ` Robin Rosenberg
2009-03-16 21:28 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1237234483-3405-7-git-send-email-robin.rosenberg@dewire.com \
--to=robin.rosenberg@dewire.com \
--cc=git@vger.kernel.org \
--cc=spearce@sparce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).