From: "Shawn O. Pearce" <spearce@spearce.org>
To: Constantine Plotnikov <constantine.plotnikov@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [JGIT PATCH 0/3] Support for loading .gitmodules from blobs
Date: Wed, 24 Jun 2009 17:26:34 -0700 [thread overview]
Message-ID: <20090625002634.GI11191@spearce.org> (raw)
In-Reply-To: <1245865685-1288-1-git-send-email-constantine.plotnikov@gmail.com>
Constantine Plotnikov <constantine.plotnikov@gmail.com> wrote:
> This series of patches is developed to support accessing
> .gitmodules file stored inside the repository. This functionality
> is needed for server-side processing of submodules.
>
> Constantine Plotnikov (3):
> Extracted functionality independent from .git/config from RepositoryConfig
> Config.getSubsections(...) now loads the file if it has not been loaded
> Added BlobBasedConfig that allows accessing configuration files stored in the blobs
Thanks, pushed, with a couple of minor edits that were just easier
to squash in than to ask you to fix and respin:
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/BlobBasedConfig.java b/org.spearce.jgit/src/org/spearce/jgit/lib/BlobBasedConfig.java
index 0385a3b..1f44994 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/BlobBasedConfig.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/BlobBasedConfig.java
@@ -136,10 +136,10 @@ protected InputStream openInputStream() throws IOException {
return new ByteArrayInputStream(blobProvider.call());
} catch (IOException e) {
throw e;
- } catch (RuntimeException e) {
- throw e;
} catch (Exception e) {
- throw new RuntimeException(e);
+ final IOException e2 = new IOException("Unable to read config");
+ e2.initCause(e);
+ throw e2;
}
}
}
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/Config.java b/org.spearce.jgit/src/org/spearce/jgit/lib/Config.java
index 4220c37..c2d5c6e 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/Config.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/Config.java
@@ -84,8 +84,9 @@
* the base configuration file to be consulted when value is
* missing from this file
*/
- public Config(Config base) {
+ protected Config(Config base) {
baseConfig = base;
+ clear();
}
/**
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java b/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
index a139386..9d2c9a3 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
@@ -108,7 +108,6 @@ public RepositoryConfig openUserConfig() {
*/
public RepositoryConfig(final RepositoryConfig base, final File cfgLocation) {
super(base, cfgLocation);
- clear();
}
/**
--
Shawn.
prev parent reply other threads:[~2009-06-25 0:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 17:48 [JGIT PATCH 0/3] Support for loading .gitmodules from blobs Constantine Plotnikov
2009-06-24 17:48 ` [JGIT PATCH 1/3] Extracted functionality independent from .git/config from RepositoryConfig Constantine Plotnikov
2009-06-24 17:48 ` [JGIT PATCH 2/3] Config.getSubsections(...) now loads the file if it has not been loaded Constantine Plotnikov
2009-06-24 17:48 ` [JGIT PATCH 3/3] Added BlobBasedConfig that allows accessing configuration files stored in the blobs Constantine Plotnikov
2009-06-25 0:26 ` Shawn O. Pearce [this message]
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=20090625002634.GI11191@spearce.org \
--to=spearce@spearce.org \
--cc=constantine.plotnikov@gmail.com \
--cc=git@vger.kernel.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).