]> source.dussan.org Git - jgit.git/commit
Remove costly quoting test in DiffFormatter 27/1527/1
authorShawn O. Pearce <spearce@spearce.org>
Fri, 3 Sep 2010 19:59:53 +0000 (12:59 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 3 Sep 2010 19:59:53 +0000 (12:59 -0700)
commit34a755f1df959bd34f9426143765e650665b1afb
treecd39835daf6b3d4a47e383b0a02687a67521a13e
parent33837e44c3ba6417cfd0fa52103bd1687dfcdfd8
Remove costly quoting test in DiffFormatter

QuotedString.GIT_PATH returns the input reference exactly if
the string does not require quoting, otherwise it returns a
copy that contains the quotes on either end, plus escapes in
the middle where necessary to meet conventions.

Testing the return against '"' + name + '"' is always false,
because GIT_PATH will never return it that way.  The only way
we have quotes on either end is if there is an escape in the
middle, in which case the string isn't equal anyway.

Change-Id: I4d21d8e5c7da0d7df9792c01ce719548fa2df16b
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java