Diff: heed DiffOptions fields OldPrefix and NewPrefix #150

Merged
sqs merged 1 commits from DiffOptions_OldPrefix_and_NewPrefix into master 2014-12-30 04:09:20 -06:00
sqs commented 2014-12-09 16:13:00 -06:00 (Migrated from github.com)

This PR makes diffing heed the OldPrefix and NewPrefix fields in
DiffOptions.

Before this patch, running the modified TestDiffTreeToTree fails:

--- FAIL: TestDiffTreeToTree-12 (0.02s)
    diff_test.go:150: Diff patch doesn't contain "x1/README" or "y1/README"

        diff --git a/README b/README
        index 257cc56..820734a 100644
        --- a/README
        +++ b/README
        @@ -1 +1 @@
        -foo
        +file changed

It passes with the changes to diff.go in this PR.

This PR makes diffing heed the OldPrefix and NewPrefix fields in DiffOptions. Before this patch, running the modified TestDiffTreeToTree fails: ``` --- FAIL: TestDiffTreeToTree-12 (0.02s) diff_test.go:150: Diff patch doesn't contain "x1/README" or "y1/README" diff --git a/README b/README index 257cc56..820734a 100644 --- a/README +++ b/README @@ -1 +1 @@ -foo +file changed ``` It passes with the changes to diff.go in this PR.
sqs commented 2014-12-29 11:29:37 -06:00 (Migrated from github.com)

I updated this PR to use the diffOptionsToC and freeDiffOptions that were recently added to master. It's a much smaller PR now. Let me know if this looks good.

I updated this PR to use the `diffOptionsToC` and `freeDiffOptions` that were recently added to master. It's a much smaller PR now. Let me know if this looks good.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#150
No description provided.