Questions tagged [diff]

The act of identifying differences between two or more files in order to support various software development activities (bug tracking, patch creation, ...)

During the development of an application it is often necessary to determine the differences between two or more files -- this activity is commonly referred as diff (see for example this entry in The Jargon File).

These are some of the scenarios for diff activities:

  • in version control systems, diff is used to understand what has changed between two revisions or changeset, in order to track down bugs or assess which tests to run;
  • diff is an important part of merge operations, where the developers compares two or more version of the same files and decides how to fix conflicting changes;
  • the output of a diff activity can be "exported" in a patch file, a compact representation that permits to reapply the changes in a later moment to a different copy of the code. Patch are often used in contributing to open source software.

This tag is used for questions related to diff activities, diff tools and their use in the context of software development.

See also "Wikipedia File_comparison".

Related tags:

4623 questions
3
votes
2 answers

svn diff -x (v1.6) does not accept my diff option --unified=40

I often use this command line that works great on Subversion 1.6.11 and GNU diff 2.8.1. svn diff -x '--unified --ignore-space-change --ignore-all-space --ignore-eol-style --show-c-function' --no-diff-deleted my-file | vim - However I want to…
oHo
  • 51,447
  • 27
  • 165
  • 200
3
votes
2 answers

How to refresh git diff output in Vim

The command I use to check the project diff is git diff | vimdiff - Is there a way I can refresh the diff file without existing Vim and repeating the previous command?
Nabil Kadimi
  • 10,078
  • 2
  • 51
  • 58
3
votes
1 answer

Diff between two remote folders through SSH

Does anyone know how to list the files that exists in one remote folder and not in another remote folder. I have two servers (say Server1 and Server2) with similar folder structure where I'm doing Rsync. However, the destination folder has more…
Sergio
  • 310
  • 4
  • 9
3
votes
3 answers

Diff command not working logically

Original file contains: B RBWBW RWRWWRBWWWBRBWRWWBWWB My file contains : B RBWBW RWRWWRBWWWBRBWRWWBWWB However when i use the command diff original myfile it shows following: 1,3c1,3 < B < RBWBW < RWRWWRBWWWBRBWRWWBWWB --- > B > RBWBW >…
mhm
  • 313
  • 1
  • 5
  • 12
3
votes
3 answers

Boolean Difference between text files on Linux?

Are there any command line linux utilities that will give me the boolean difference between two text files? Meaning: File-A: Apple Pear Orange Banana File-B: Pear Orange Running % program File-A File-B -o output output: Apple …
noli
  • 15,927
  • 8
  • 46
  • 62
3
votes
2 answers

How to ignore comment changes and blank line changes in two files?

I am using "svn diff" command to get changes at directory level but this diff include all the comment line changes and blank line changes. How can I ignore these values? ex: diff file: + import...... + some code + #comment + blank line + some…
Developer
  • 81
  • 7
3
votes
3 answers

Difference in seconds between two times in two rows in the same column - MySql

how to make the following Table bestellungen id abholdatum abholzeit 1 2014-02-03 03:35:00 2 2014-02-03 08:30:00 3 2014-02-03 05:10:00 4 2014-02-03 15:25:00 5 2014-02-03 …
Pinelo
  • 33
  • 4
3
votes
1 answer

Diff against multiple changelists with Perforce

I have some software that is version controlled with Perforce. There are a lot of checkins, and hence a lot of changelists. There is one feature, implemented with many checkins across a long period of time, that I would like to port elsewhere. I can…
kmort
  • 2,848
  • 2
  • 32
  • 54
3
votes
3 answers

How to compare .mat files in matlab with different timestamps

I have two .mat files foo.mat and foo2.mat. They are identical except for the time stamp on them. I use visdiff to check the differences and it says they are the same except their binary. How can I compare .mat files while ignoring the time stamp?…
user758114
  • 354
  • 5
  • 22
3
votes
3 answers

Meld requires pygtk 2.8.0 or higher

I need a diff tool to use with svn, found meld already installed, set-up rapid-svn to use it, but when I right-click and select diff, nothing happened. so tried meld on command to see if it works: gunselic@gezxx:~$ meld No module named pygtk Meld…
gezgingun
  • 462
  • 5
  • 11
3
votes
1 answer

git diff returns incorrect

I am trying to check my master branch against another branch. It is hosted on bitbucket and I have verified there that branch (called incremental) is just returning nothing. So when I diff the branch like this: git diff master..incremental I get…
Frank Conry
  • 2,694
  • 3
  • 29
  • 35
3
votes
1 answer

Is there a way to view git history using external diff tool?

When I view a git commit history in git gui, is there a way to use an external diff tool to show commit differences?
seticer
  • 139
  • 1
  • 9
3
votes
2 answers

using data.table to calculate and format time difference between rows by group

Im new to the data.table "scene" so I apologize if my question is simplistic. I am constantly in the position to where I have to apply some analysis or subset some data grouped by a Unique ID. Typically I have about 1,000 rows per Unique ID with…
Kerry
  • 793
  • 14
  • 33
3
votes
4 answers

Using Subversion TortoiseSVN Merge Algorithm in a .NET Project

I have a whole bunch of pairs of files that have subtle differences. We use subversion for a source control, and I like the Merge/Diff utility that comes with TortoiseSVN for windows. And I can use this utility to manually compare/merge two files…
Josh Stodola
  • 81,538
  • 47
  • 180
  • 227
3
votes
2 answers

How to colour lines in LaTeX that match regular expressions

I'm currently using the LaTeX listings package to display a block of code, and a diff of the file against a previous version. Both blocks are coloured by listings as if they are code (which they are) but I would like to colour the diff similarly to…
TheHud
  • 347
  • 3
  • 10
1 2 3
99
100