* [PATCH] Allow git config files to use keys containing the hyphen character '-'
@ 2008-03-28 23:15 thadh
0 siblings, 0 replies; only message in thread
From: thadh @ 2008-03-28 23:15 UTC (permalink / raw)
To: git; +Cc: thadh, Thad Hughes
From: Thad Hughes <thadh@thad.corp.google.com>
---
.../src/org/spearce/jgit/lib/RepositoryConfig.java | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
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 78ceba7..42b2c5d 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
@@ -496,7 +496,10 @@ public class RepositoryConfig {
}
}
break;
- } else if (Character.isLetterOrDigit((char) c)) {
+ } else if (Character.isLetterOrDigit((char) c) || c == '-') {
+ // From the git-config man page:
+ // The variable names are case-insensitive and only
+ // alphanumeric characters and - are allowed.
name.append((char) c);
} else if ('\n' == c) {
r.reset();
--
1.5.4.2.156.ge3c5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-28 23:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-28 23:15 [PATCH] Allow git config files to use keys containing the hyphen character '-' thadh
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).