]> source.dussan.org Git - jgit.git/commit
PersonIdent: Document that name and email aren't trimmed 10/71710/2
authorDave Borowitz <dborowitz@google.com>
Fri, 29 Apr 2016 14:47:17 +0000 (10:47 -0400)
committerDave Borowitz <dborowitz@google.com>
Fri, 29 Apr 2016 15:27:06 +0000 (11:27 -0400)
commit773f9661d0634fb3ad69466c0f0ec4d65cb2122d
treebdbbaa1402cdbaee50b88cd124aea8894565726f
parentadff322a698b2f248180c0a2c81dbeaf50015420
PersonIdent: Document that name and email aren't trimmed

This might be somewhat surprising behavior to users who might
naturally assume the following invariant:
  ident.equals(parseIdent(ident.toExternalString()))

This invariant does not hold since whitespace is only trimmed during
serialization. We don't want to mess with the strings during
initialization, as this is called during the highly-optimized commit
parsing codepath.

Change-Id: I081a603f0ac0e33167462244779b0ff3ad51e80c
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java