diff

does git store diff information in commit objects?

感情迁移 提交于 2019-12-03 04:04:48
问题 According to this: It is important to note that this is very different from most SCM systems that you may be familiar with. Subversion, CVS, Perforce, Mercurial and the like all use Delta Storage systems - they store the differences between one commit and the next. Git does not do this - it stores a snapshot of what all the files in your project look like in this tree structure each time you commit. This is a very important concept to understand when using Git. Yet when I run git show

Diff for Directed Acyclic Graphs

末鹿安然 提交于 2019-12-03 03:45:11
问题 I'm looking for an algorithm which can diff two Directed Acyclic Graphs(DAGs). That is, I'd like an algorithm which produces a sequence of deletions and insertions on the first DAG to produce the second DAG. I'm not a hundred percent sure, but I think a longest common subsequence can be applied to the DAGs. I'm less concerned about the length of the resulting edit sequence (as long as it's short enough) and more concerned about the running time of the algorithm. One complication is that none

Configuring a diff-tool for Git on Windows

僤鯓⒐⒋嵵緔 提交于 2019-12-03 03:39:07
Since git diff in powershell mostly results in a unreadable amount of whitespace or strange characters, I installed Perforce P4Merge, to handle merging and diff. However, I can't make git diff open the p4merge application to view the diff in. So far my .gitconfig looks like this: [diff] tool = p4diff [difftool "p4diff"] external = 'C:/PROGRA~1/Perforce/p4merge.exe "$LOCAL" "$REMOTE"' prompt = false [merge] keepBackup = false tool = p4merge [mergetool "p4merge"] cmd = "$BASE" "$LOCAL" "$REMOTE" "$MERGED" path = 'C:/PROGRA~1/Perforce/p4merge.exe' prompt = false keepBackup = false keepTemporaries

Open source command line tool for Linux to diff XML files ignoring element order

醉酒当歌 提交于 2019-12-03 03:36:44
Is there an open source command-line tool (for Linux) to diff XML files which ignores the element order? Example input file a.xml : <tag name="AAA"> <attr name="b" value="1"/> <attr name="c" value="2"/> <attr name="a" value="3"/> </tag> <tag name="BBB"> <attr name="x" value="111"/> <attr name="z" value="222"/> </tag> <tag name="BBB"> <attr name="x" value="333"/> <attr name="z" value="444"/> </tag> b.xml : <tag name="AAA"> <attr name="a" value="3"/> <attr name="b" value="1"/> <attr name="c" value="2"/> </tag> <tag name="BBB"> <attr name="z" value="444"/> <attr name="x" value="333"/> </tag> <tag

Merge diff between two branches to third branch

断了今生、忘了曾经 提交于 2019-12-03 03:30:18
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_feature . ( new_feature branch is not ready to be pushed) Is there a way I can take the diff between

Creating Delta Diff Patches of large Binary Files in C#

烈酒焚心 提交于 2019-12-03 03:29:49
I looking for a way to create Delta Diff Patches of Large Binary Files (VMWare Virtual Disk Files). Is there an implementation in C# or any useful methods in the the .NET Framework. Any help is appreciated. Thanks. rAyt There's nothing built into the framework to do this. You're going to have to look for 3rd party solutions, commercial or free, or write your own. A common algorithm is the VCDiff algorithm, which is used by quite a large number of products. bsdiff was designed to create very small patches for binary files. As stated on its page, it requires max(17*n,9*n+m)+O(1) bytes of memory

Setup 'git diff' for special file types

你说的曾经没有我的故事 提交于 2019-12-03 03:13:32
I want to manage Excel files in one of my repositories. Diffing them is a problem (they are binary files). However, there is a nice tool for diffing them: https://github.com/na-ka-na/ExcelCompare I wanted to set it up using .gitattributes *.xls diff=excel *.xlsx diff=excel And in the .git/config : [diff "excel"] textconv = excel_cmp.bat The command excel_cmp.bat file1.xls file2.xls works very well. However, the setup I use above seems to try to convert the excel files to text using excel_cmp.bat and then diffs the text output. How do I setup the diff tool to diff two files - and not to convert

How can I disable diff in line separators in IntelliJ IDEA?

∥☆過路亽.° 提交于 2019-12-03 03:06:38
I'm using Intellij IDEA 14 on Windows and Git as VCS on Unix server. The line separator in Windows is CLRF ( \r\n ) and LF ( \n ) in Unix. In Git, I'm using config --global core.autocrlf input . This will translate all CRLF's to LF's upon commit. When I'm using "Reformat code" option on well-formatted file, IDEA marks files as changed and shows diff in line separators only. How can I disable that in IDEA? In the bottom right of your window, change [CRLF] to [LF] I'm also developing on windows and Because our servers are powered by Linux and all the code has to base on Linux I have preferred to

Set git diff to a default value

柔情痞子 提交于 2019-12-03 02:42:30
问题 I previously changed my git diff tool with git config --global diff.external <diff-tool-name> . I decided I don't like that tool and wanted to switch back. I tried meddling around and did something like: git config --global diff.external git-diff . Now calling git diff to see unstaged changes yields: fatal: ambiguous argument '48e66b706d21398f28240810e7fc0d44d8f92d99': unknown revision or path not in the working tr Use '--' to separate paths from revisions external diff died, stopping at

How can KDiff3 be used properly with TortoiseSVN to resolve conflicts?

删除回忆录丶 提交于 2019-12-03 02:42:24
问题 I have TortoiseSVN set up to use KDiff3 as the conflict resolution tool (I find it shows more information useful to the merge than the built-in TortoiseMerge does). When I open a file with Tortoise's "Edit Conflicts" command it shows me the three files and I have to select "Merge->Merge Current File" manually. The problem is that KDiff3 saves the result to source_file.working instead of to source_file . So without doing a Save As, the real file with the conflict doesn't get modified. Is there