2

I am writing a PHP script that needs to interpret Diff files as created by Git. How should I proceed if I want to parse the Diff file and basically print it in a completely different format?

I have come across the Text_Diff PEAR library, but that one only creates the Diffs itself. Or rather, it only takes two different files as input. Is there a way to use that set of classes to achieve what I want (feed in a diff and get a tokenized diff as output, basically split up into the operations)?

1 Answer 1

1

I will recommend you to take a look to the diff module drupal has, because the it use a Diff Engine class from a wiki that might be the solution you are looking for.

http://drupal.org/project/diff

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.