diff

Can I make git recognize a UTF-16 file as text?

I'm tracking a Virtual PC virtual machine file (*.vmc) in git, and after making a change git identified the file as binary and wouldn't diff it for me. I discovered that the file was encoded in UTF-16. Can git be taught to recognize that this file is text and handle it appropriately? I'm using git under Cygwin, with core.autocrlf set ...

How do I diff utf-16 files with GNU diff?

GNU diff doesn't seem to be smart enough to detect and handle UTF-16 files, which surprises me. Am I missing an obvious command-line option? Is there a good alternative? ...

How should I save a file in OpenOffice so that it is not a binary file in Subversion?

I'm working on an Open Office document with a partner and we are using subversion to collaborate on it. However, we are saving the document as a .odt file and subversion reads this as a binary file type. Therefore it has me worrying that when we go to merge the files and the diff pops up that we will not be able to adequately perform the...

Best graphical source code diff viewer/editor for code comparison and merging?

The options for source code diff viewing/editing/merging seem to be: Free: Tortoise Merge Meld * WinDiff WinMerge * DiffMerge * KDiff AJC Diff Diffuse Commercial: Total Commander's Diff viewer * Beyond Compare * Delta Walker * Araxis Merge * Are there any other options? (Wikipedia suggests a few) What's your favorite tools fo...

Diff Algorithm

I've been looking like crazy for an explanation of a diff algorithm that works and is efficient. The closest I got is this link to RFC 3284 (from several Eric Sink blog posts), which describes in perfectly understandable terms the data format in which the diff results are stored. However, it has no mention whatsoever as to how a program...

From a PHP Code Diff, can you tell which Classes and Functions have changed?

Background: PHPDoc ( http://www.phpdoc.org/ ) is a brilliant tool for extracting html documentation of your classes or methods from comments in your files. Adding PHPDoc comments also has other advantages - if you use an IDE like Zend or Netbeans, it will use the PHPDocs to show you autocompletion tips. Most Issue trackers have a featu...

include externals in subversion diff

i have setup my project in SVN to use an external library. When i want to push some modifications to the live server i do a diff between versions and copy only the changed files. My problem is that the diff does not check the external modifications also, it justs returns the project modifications. What is your strategy to deploy modifi...

Free/OpenSource .NET Diff generator?

I'm looking for a free library that can take two strings and produce a diff much like the diff's you see on edit revisions here on SO. I'm hoping one exists, as this is a trivial part of an app I'm working on and I'd hate to waste time reinventing the wheel. Any suggestions? ...

Determine the differences between two nearly identical photographs

This is a fairly broad question; what tools/libraries exist to take two photographs that are not identical, but extremely similar, and identify the specific differences between them? An example would be to take a picture of my couch on Friday after my girlfriend is done cleaning and before a long weekend of having friends over, drinking...

Does anyone else prefer visual diffing to unified diff patch files?

I took over some code that hadn't been developed since 2002 and I looked through the patches sent against it over time. All these patches were in unified diff format, which apparently is the de facto standard for submitting code improvements. Here's what one patch looked like: @@ -365,7 +385,10 @@ return () unless defined $op_sym; ...

How to set Araxis as diff / merge tool for MSYS git?

I'm trying to use Araxis Merge as my diff / merge tool for MSYSGit. I found a few resources on the net: On the Araxis site, they mention an "easy" way, but it implies a executables (araxisgitdiff.exe and araxisgitmerge.exe) that are not part of my distro. I also found some info in gitguru, but the actual information re: Araxis is spar...

In Windows, what's the most efficient way to compare two files and return just the records missing in the second file that were originally present in the first file?

At regular intervals we are receiving CSV files from an external source that we have little control over. These files are complete sets of current records; however, any records that have been deleted since the previous are not present. We would like to compare the two files and create a separate file of deleted records so we can do som...

Website/Webservice deployment environment diff/monitor?

My companies' system is build from a collection of ASP.NET websites, webservices, windows services and databases. (around 40 all told) We maintain three environments - QA, PREPROD and LIVE; but managing what is installed (and working) on each environment is a real pain. We seem to spend more time debugging what is installed & working ...

Is there a way to use NetBeans DIFF tool as an external diff editor for TortiseSVN, or other editor?

... or perhaps a way to launch NetBeans through a middle-man app and open up a BASE and LOCAL file in the DIFF editor ... ...

Is there an SVN command to find the difference between two local files?

What is the SVN command to find the difference between two files on the hard disk (neither of which are in the repository)? What is the command to find if one of the file is in a particular revision of SVN? What are some of the cool things you do using SVN commands? ...

Algorithms: Interesting diffing algorithm.

This came up in a real-world situation, and I thought I would share it, as it could lead to some interesting solutions. Essentially, the algorithm needs to diff two lists, but let me give you a more rigorous definition of the problem. Mathematical Formulation Suppose you have two lists, L and R each of which contain elements from some...

Pasting diff output into Microsoft Outlook with syntax highlighting

How can I copy diff output (diff old-version.cpp new-version.cpp) into an Outlook email so I can send it to other people with syntax highlighting? I'd either like to pipe diff output to a program that will copy it to the clipboard with formatting (p4 diff file.cpp | rtfpatch) or have a plugin for Outlook that lets me select some text, c...

Sequence comparison in java.

I'm looking for a standard algorithm/code (Java) which compares two integer lists (old and new) and gives a third result list which provides actions to convert the 'old' list into the 'new' list. For example: old-> 1, 2, 3, 4 new-> 9, 2, 3, 6, 4 so the result should be something like: 1-, 9+, 2, 3, 4-, 6+, 4+ Here, the suffix: ...

How to print the comparison of two multiline strings in unified diff format?

Do you know any library that will help doing that? I would write a function that prints the differences between two multiline strings in the unified diff format. Something like that: def print_differences(string1, string2): """ Prints the comparison of string1 to string2 as unified diff format. """ ??? An usage exampl...

Is there a way to diff files sentence-by-sentence instead of line-by-line?

Just trying to get diff to work better for certain kinds of documents. With LaTeX, for example, I might have a long paragraph that is strictly just one line, but I don't want to see that entire paragraph if just a sentence is changed. Particularly if I'm running some kind of version control and a co-author edits the same paragraph (but n...