Allow git config files to use keys containing the hyphen character '-'
PATCH 1/1 Allow git config files to use keys containing the hyphen character '-'
From: Thad Hughes <[email protected]>
--- .../src/org/spearce/jgit/lib/RepositoryConfig.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java +4 -1
@@ -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();
Signature · 1 line
1.5.4.2.156.ge3c5