DESCRIPTION

Extract 'Create Patch' into operation for reusability

In order to reuse the create patch functionality, it was extracted into
it's own operation, purely depending on JGit and decoupled from
FileDiff.

Also moved functionality for generating a filename for a specific commit
into the operation to be reusable. Tests added for the operation.

Change-Id: I6ce514ef020eacd42a94496dba80873b8e7f8743
Signed-off-by: Marley Hopkins xxx@xxx.xxx

COMMENTS

author: Brenden Conley
date: 2011-07-24 03:33:16.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2011-07-24 03:38:07.000000000

Patch Set 1: Build Successful

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

-------------------------------------
author: Carlie Harper
date: 2011-07-28 08:22:11.000000000

Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

Great change.

However, I think now the patch does not work with different encoding anymore. Please see my inline comment.

Line:39, org.eclipse.egit.core/src/org/eclipse/egit/core/op/CreatePatchOperation.java -> This field was introduced in commit 0c90acfe in order to store the encoding of the currently processed file for use inside the DiffFormatter.

I admit that there is no test for files with different encoding (or even no test at all), but I think that now it does not work anymore. Could you please check this?

-------------------------------------
author: Marley Hopkins
date: 2011-08-10 12:21:35.000000000

Patch Set 1: (1 inline comment)

Fixed encoding behavior.

Line:39, org.eclipse.egit.core/src/org/eclipse/egit/core/op/CreatePatchOperation.java -> Reimplemented the same strategy, had to move some util methods into core.

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