{"thread":{"id":"12909","subject":"[PATCH] Allow git config files to use keys containing the hyphen character '-'","startedAt":"2008-03-28T23:15:33Z","lastAt":"2008-03-28T23:15:33Z","messageCount":1,"participants":["thadh@google.com"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"73296","messageId":"1206746133-25974-1-git-send-email-thadh@google.com","threadId":"12909","inReplyTo":null,"subject":"[PATCH] Allow git config files to use keys containing the hyphen character '-'","fromName":"","fromEmail":"thadh@google.com","sentAt":"2008-03-28T23:15:33Z","receivedAt":"2008-03-28T23:15:33Z","isPatch":true,"sender":{"key":"thadh@google.com","avatar":null},"body":"From: Thad Hughes <thadh@thad.corp.google.com>\n\n---\n .../src/org/spearce/jgit/lib/RepositoryConfig.java |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java b/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java\nindex 78ceba7..42b2c5d 100644\n--- a/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java\n+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java\n@@ -496,7 +496,10 @@ public class RepositoryConfig {\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tbreak;\n-\t\t\t} else if (Character.isLetterOrDigit((char) c)) {\n+\t\t\t} else if (Character.isLetterOrDigit((char) c) || c == '-') {\n+\t\t\t\t// From the git-config man page: \n+\t\t\t\t//     The variable names are case-insensitive and only \n+\t\t\t\t//     alphanumeric characters and - are allowed.\n \t\t\t\tname.append((char) c);\n \t\t\t} else if ('\\n' == c) {\n \t\t\t\tr.reset();\n-- \n1.5.4.2.156.ge3c5\n"}]}