Community
Participate
Working Groups
Build Identifier: 20100218-1602 EGit seems to create an invalid config file if a branch name requires quoting, for example in my case it output this: [branch ""#1063-GWT-Unit-Tests""] remote = origin merge = "refs/heads/#1063-GWT-Unit-Tests" which was rejected by both EGit and command line git's parsers as an invalid configuration directive. Reproducible: Always Steps to Reproduce: 1. Create a branch named "#1234-test" 2. Add a new remote 3. See extra ""'s in the config file
Branch name validation code review at http://egit.eclipse.org/r/#change,1144
Branch name validation and specification does acutally allow #. The bug is somewhere in the clone coding. The command line clones correctly.
Ok, this happens in Config.toText(): public String toText() { final StringBuilder out = new StringBuilder(); for (final Entry e : state.get().entryList) { if (e.prefix != null) out.append(e.prefix); if (e.section != null && e.name == null) { out.append('['); out.append(e.section); if (e.subsection != null) { out.append(' '); out.append('"'); out.append(escapeValue(e.subsection)); out.append('"'); } The escapeValue() method proably needs to be extended so that it doesn't "inquote" in this special case.
A fix is proposed at http://egit.eclipse.org/r/#change,1452
Merged as 2941d23e7ebaa524e7d9efbaf69565a57042d048