summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorDave Borowitz <dborowitz@google.com>2013-02-08 11:35:20 -0800
committerDave Borowitz <dborowitz@google.com>2013-02-08 11:36:50 -0800
commit51d0e1f26e23d04ae73054958546159e01196a4d (patch)
treecaf8cd9cc100fc300e5e7891f32eb052993854b7 /org.eclipse.jgit
parent3a4ebc0c24b7732a57064299153794084fbfae59 (diff)
downloadjgit-51d0e1f26e23d04ae73054958546159e01196a4d.tar.gz
jgit-51d0e1f26e23d04ae73054958546159e01196a4d.zip
Fix Config.fromText to not skip a last line with no newline
Change-Id: Id6da6ff19296410806282bb7419fd8455e8c5475
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
index af04b10901..8240ac8f76 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
@@ -1002,8 +1002,11 @@ public class Config {
ConfigLine e = new ConfigLine();
for (;;) {
int input = in.read();
- if (-1 == input)
+ if (-1 == input) {
+ if (e.section != null)
+ newEntries.add(e);
break;
+ }
final char c = (char) input;
if ('\n' == c) {