DESCRIPTION

Check for trailing newline before writing to .gitignore file.

IgnoreOperation wrote entries to the .gitignore file without checking
if the file currently had a trailing newline which would cause
entries to get written on the same line as other entries for files
that were missing a trailing newline.

Added unit test to IgnoreOperationTest for this case.

Bug: 339419
Change-Id: I422ec5e92e3fcfea0d8bf6d3bfaf38245e505733
Signed-off-by: Jaidyn Nichols xxx@xxx.xxx


COMMENTS

author: Jaidyn Nichols
date: 2011-03-24 00:37:42.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2011-03-24 00:37:46.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/151/ 

-------------------------------------
author: Brenden Conley
date: 2011-03-24 00:41:32.000000000

Patch Set 2: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/151/ : SUCCESS

-------------------------------------
author: Leslie Stephenson
date: 2011-03-24 00:49:28.000000000

Patch Set 2: (3 inline comments)

Please see my comments

Line:180, org.eclipse.egit.core/src/org/eclipse/egit/core/op/IgnoreOperation.java -> AFAIR Mac Os X uses only '\r' as a line end so this code would not work on Os X.

Line:203, org.eclipse.egit.core/src/org/eclipse/egit/core/op/IgnoreOperation.java -> Style nit: we don't use brackets for single line blocks

Line:81, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/IgnoreOperationTest.java -> Irrelevant line deletation.

-------------------------------------
