git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[JGIT PATCH 00/12] Cleanup Config class

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 21, 2009, 20:19 UTC
Message-ID
<1248207570-13880-1-git-send-email-spearce@spearce.org>

Misc. cleanups of the Config class (aka the base class for RepositoryConfig) to make the code easier to follow. I came about this series because I started to do improvements to the Config class to better support submodule introspection from a bare repository... and I realized this code was a mess.

This series (or at least the first patch of it) applies on top of my prior 11 patch series for alternate object database improvements.

Shawn O. Pearce (12):
  Use NB.readFully(File) to slurp complete file contents
  Correct name of fileRead member of Config class
  Add setLong to Config
  Fix Config setInt(..., 0) to store "0" not "0 g"
  Rename Config.unsetString to just unset()
  Remove pointless null assignments in Config
  Clarify section and subsection values in Config code
  Don't subclass PrintWriter when writing the Config
  Use a Java 5 style iteration over the Config entries list
  Match config subsection names using case sensitive search
  Cleanup Config's MAGIC_EMPTY_VALUE to be more safe
  Remove unreferenced REMOTE_SECTION from RepositoryConfig
 .../src/org/spearce/jgit/lib/Config.java           |  196 +++++++++++---------
 .../src/org/spearce/jgit/lib/FileBasedConfig.java  |    7 +-
 .../src/org/spearce/jgit/lib/RefDatabase.java      |   15 +-
 .../src/org/spearce/jgit/lib/ReflogReader.java     |   32 +---
 .../src/org/spearce/jgit/lib/RepositoryCache.java  |   20 +-
 .../src/org/spearce/jgit/lib/RepositoryConfig.java |    4 -
 .../org/spearce/jgit/lib/UnpackedObjectLoader.java |   15 +--
 .../org/spearce/jgit/transport/RemoteConfig.java   |    2 +-
 org.spearce.jgit/src/org/spearce/jgit/util/NB.java |   52 +++++
 9 files changed, 195 insertions(+), 148 deletions(-)
Next: Shawn O. Pearce
Message 1 of 18 in “Cleanup Config class”
  1. 00/12 Cleanup Config classShawn O. Pearce, Jul 21, 2009
  2. 01/12 Use NB.readFully(File) to slurp complete file contentsShawn O. Pearce, Jul 21, 2009
  3. 02/12 Correct name of fileRead member of Config classShawn O. Pearce, Jul 21, 2009
  4. 03/12 Add setLong to ConfigShawn O. Pearce, Jul 21, 2009
  5. 04/12 Fix Config setInt(..., 0) to store "0" not "0 g"Shawn O. Pearce, Jul 21, 2009
  6. 05/12 Rename Config.unsetString to just unset()Shawn O. Pearce, Jul 21, 2009
  7. 06/12 Remove pointless null assignments in ConfigShawn O. Pearce, Jul 21, 2009
  8. 07/12 Clarify section and subsection values in Config codeShawn O. Pearce, Jul 21, 2009
  9. 08/12 Don't subclass PrintWriter when writing the ConfigShawn O. Pearce, Jul 21, 2009
  10. 09/12 Use a Java 5 style iteration over the Config entries listShawn O. Pearce, Jul 21, 2009
  11. 10/12 Match config subsection names using case sensitive searchShawn O. Pearce, Jul 21, 2009
  12. 11/12 Cleanup Config's MAGIC_EMPTY_VALUE to be more safeShawn O. Pearce, Jul 21, 2009
  13. 12/12 Remove unreferenced REMOTE_SECTION from RepositoryConfigShawn O. Pearce, Jul 21, 2009
  14. Robin RosenbergJul 21, 2009
  15. Shawn O. PearceJul 21, 2009
  16. Constantine PlotnikovJul 22, 2009
  17. Robin RosenbergJul 22, 2009
  18. Ensure Config readers handle case insensitive names correctlyShawn O. Pearce, Jul 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.