diff

What does interdiff do that diff cannot?

荒凉一梦 提交于 2019-12-03 16:45:08
If I'm trying to find the diff between two diffs, why can't I just diff the two diffs? I have tested diff diff1 diff2 and interdiff diff1 diff2 and have not found any difference in the output. In what case would they be different? (I am fully aware that interdiff's stated purpose is to find the changes between two patches.) Why use interdiff and not just simply diff two patches? An interdiff tells you whether lines removed in the second patch were added in the first patch, and similarly, whether lines added in the second patch were removed in the first patch. Simply diffing the two commits

How to make git log show file paths relative to current directory?

三世轮回 提交于 2019-12-03 16:43:07
The current Git-based project that I am working on, I am generally always in a sub-directory. Below is the output when I run the command git log --name-only from a sub-directory of the root of the repository. commit 678bd5ba6fc5474c4c61406768bf6cba5937c5d1 Author: thegreendroid Date: Mon Mar 27 09:36:24 2017 +1300 Commit message child_dir1_from_root/file1 | 184 +-- child_dir2_from_root/file2 | 2 +- How do I instead get git log to output something like below instead? This makes diffing the files listed really easy, by just copying the file path and running git diff HEAD~ {copied_file_path}

How to let Mercurial show “hg out --patch” diff as visual diff?

╄→尐↘猪︶ㄣ 提交于 2019-12-03 16:14:24
It looks like hg out --patch or hg out -p is a good way to see what code is pushed out to the repo (when it is pushed)... but the diff is in text format. Is there a way to make it use kdiff3 as well? hg outgoing --patch shows the changes in each changeset separately, which probably isn't what you want if you're looking for a visual representation. You more likely want the GUI equivalent of hg diff -r your_latest_changeset -r remote_servers_latest_changeset where the latest changesets are the respective tip revisions if you're not using named branches. You can get that in your favorite GUI

How can I perform a diff that ignores all comments?

别等时光非礼了梦想. 提交于 2019-12-03 15:44:42
问题 I have a large codebase that was forked from the original project and I'm trying to track down all the differences from the original. A lot of the file edits consist of commented out debugging code and other miscellaneous comments. The GUI diff/merge tool called Meld under Ubuntu can ignore comments, but only single line comments. Is there any other convenient way of finding only the non-comment diffs, either using a GUI tool or linux command line tools? In case it makes a difference, the

Lotus Notes Diff Tool

限于喜欢 提交于 2019-12-03 15:11:33
Is there any diff tool for Lotus Notes which allows to compare scripts, design elements and documents? If all else fails (and by "all else" I mean the often ridiculous corporate procurement system) you can always do a an export to DXL (or a Design Synopsis for code alone) and use any decent text editor with a diff function. It's not TeamStudio Delta, but it will get you where you want to go. I see this is an old question, and most of the other answers are a little outdated now, so I thought I would add some hopefully valuable information for those who should stumble upon this now. In Domino

How can I diff two files with full context?

一曲冷凌霜 提交于 2019-12-03 15:03:12
问题 I have two files with slight differences. A normal diff will show me the differences between the files. With -c or -u I can add an amount of context to each hunk. What options can I pass to diff to see every unchanged line alongside the changes, and get the diff as a single, large hunk? 回答1: Use the "-y" option for full side by side output diff -y file1 file2 Will give you output something like * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. * Lorem ipsum dolor sit amet,

Using an alternate diff algorithm in Git

牧云@^-^@ 提交于 2019-12-03 14:55:02
问题 Because git is designed for source code, its default diff algorithm treats a line as the minimum indivisible unit. I am trying to edit some markdown files that are word wrapped at column 80. Adding a sentence can cause the rest of the paragraph to be marked as changed. Is there a way to have Git use a diff algorithm more suited to text? I need one that treats words or sentences as indivisible units rather than lines? 回答1: You might try git diff --word-diff instead. $ git diff --word-diff diff

Command line diff utility [closed]

隐身守侯 提交于 2019-12-03 14:38:52
can some one recommend a good (hopefully free) command line diff utility. I would basically need to kick it off from .Net to produce some sort of a text file with the differences between two xml files. Thanks! You can always use the build in fc filecompare tool of windows but, although not free, I would recommend Beyond Compare . Besides being a very good graphical diff tool, it can be used from the command line too. Check out MSYS , it gives you diff and all the common GNU utilities on Windows. As somebody else stated, you can also get diff and all that stuff on Windows by installing Cygwin .

Merge diff between two branches to third branch

非 Y 不嫁゛ 提交于 2019-12-03 14:30:05
问题 Assume I have two branches, master and new_feature I was supposed to work on a specific feature, I thought this feature would be part of new_feature so, I checked out specific_feature branch out of the new_feature branch, like so git checkout -b specific_feature Now I did a lot development in this specific_feature branch, merged upstream/new_feature into it a couple of times to get the remote changes. Now, I come to know that my specific_feature should have been branched out of master not new

How to get diff to report summary of new, changed and deleted lines

空扰寡人 提交于 2019-12-03 14:20:50
问题 I want to have summary of difference between two files. Expected output is count of new, deleted and changed lines. Does diff readily provides such output? If not is there any script/utility available which helps in getting the summary. 回答1: If you use diff -u it will generate a unified diff that has lines preceded with + and - . If you pipe that output through grep (to get only the + or - ) and then to wc you get the counts for the + es and the - es respectively. 回答2: I think you are looking