4,680 questions
2
votes
1
answer
61
views
How to compare the changes in two branches?
Say I have four commits A, B, C and D, with A being an ancestor of B and C being an ancestor of D. I now want to verify that the changes from A to B are the same as the changes from C to D (or show ...
0
votes
1
answer
68
views
how to make git diff / wdiff / ... to do word diff and interpret changes on different adjacent lines always individually?
if you change this file:
div
{
max-width: 50%;
max-height: 50%;
}
into this:
div
{
max-width: 100%;
}
git diff --word-diff will print:
div
{
max-...
0
votes
1
answer
38
views
Differential code coverage policy at folder level in ADO pull requests
I'm exploring the usage of azurepipelines-coverage.xml to enable differential code coverage policy.
I would like to know if this supports a sub-folder level target for differential code coverage.
I ...
0
votes
2
answers
142
views
Using bash variables instead of files as input to git commands
I have a script which sets useful git settings and aliases, and I want to end by printing the difference between git config --global --list before and after. I'd like to show the diff in the same ...
0
votes
0
answers
42
views
How to compare XMLs and their nested content?
I have the following structure that I need to compare:
<ROOT>
<name>
<name>string</name>
<type>number</type>
<server>string</...
2
votes
1
answer
32
views
How to add filename to mercurial diff data
A colleague sent me the diff data of a file that he forgot to commit, before going on vacation. This diff data is the copy/past of the contents of the TortoiseHg Workbench diff window, with only code ...
5
votes
3
answers
129
views
calculate diff to previous matching row in a dataframe
I have a series of timestamps (+ other data) that come from 2 separate streams of data ticking at different rates, an example below (NB: the frequency of the real data has some jitter so it's not a ...
2
votes
0
answers
61
views
How do I implement a flow-controlled Netty pipeline with both a FlowControlHandler and HttpContentDecompressor?
Duplicating https://github.com/netty/netty/issues/15053:
I'm trying to build a flow-controlled Netty pipeline with (amongst other things) a FlowControlHandler near the top and a ...
2
votes
1
answer
209
views
Does Node.js have a built-in way to diff two strings?
I know there are third-party libraries for generating diffs in JavaScript, but I'm wondering if recent versions of Node.js include a native way to compare two strings and show their differences.
Is ...
0
votes
1
answer
132
views
Show differences between commits with respect to a base
We use a common git strategy:
branch from main to a feature branch.
do commits in feature.
if main progresses, merge it to feature.
merge feature to main.
I want to view the changes that happened ...
2
votes
2
answers
121
views
Enable Code Coverage diff without a target/gate threshold in ADO
I have code coverage enabled and published in my ADO pull request pipeline. I'm looking at adding code coverage diff to it.
The Microsoft Learn Document doesn't mention how to fail a build if the ...
0
votes
1
answer
59
views
Differential Code Coverage in Azure DevOps (ADO) for logical monorepo
I'm working on a project, where I have a pull request pipeline for a logical monorepo.
For this I'm using the git submodule functionality to pull a few repositories into mine, and building them.
I use ...
0
votes
1
answer
93
views
Detect renames with `git difftool --dir-diff`
With git difftool --dir-diff, I can 'diff a whole tree by preparing a temporary copy'. However, I then lose information about renames. Here's a comprehensive example demonstrating the same.
git init
...
-1
votes
1
answer
42
views
HTTP headers for REST API diff
I'm building a rest API that has an endpoint for a collection of items. The response is a large JSON array, which takes a while for the client to process. On the server-side, each item in the ...
0
votes
1
answer
51
views
How can I tell a file was renamed using pygit2
I am running a diff between 2 consecutive commits and the only change between them is a rename of one file without any change in content involved. If I run a show on the parent commit, I get this from ...
2
votes
0
answers
128
views
Make git diff --color-moved machine readable?
Reading the git documentation and stuff online, it just mentions having the ability to change the colors of the moved lines when specifying --color-moved, but there is no mention of an option to ...
0
votes
0
answers
71
views
How to achieve "git diff --numstat" with additional moved lines stats
This is for a javascript app, so no UI needed.
My goal is to get stats of changes between 2 commits, basically exactly what git diff --numstat does, but also, along with the additions and deletions ...
0
votes
1
answer
123
views
How can I set the diff algorithm for a git diff on Azure Devops?
The --diff-algorithm option allows you to change how a diff is displayed - I use "histogram" to create a diffs that appear more logical to me when I'm running git on the command line.
How ...
0
votes
0
answers
15
views
How to compare 2-files at different locations
I have my project viewing explorer window under VSCode and I need to compare one of the file from that project to another which is opened from different location and it is not part of the project and ...
0
votes
0
answers
51
views
Error when using inverse_transform with Diff() in Darts: "Expected series to begin at time X"
I am working on a time series forecasting problem using the Darts library in Python. My goal is to forecast non-stationary time series data, specifically groundwater level data, using various models ...
0
votes
0
answers
56
views
In GitKraken, when comparing against working directory, is there any way to get a writeable editor?
I have a stack of commits that I think I am ready to merge to main. I can easily right click on "origin/main" and select "Compare commit against working directory". This gives me a ...
-1
votes
1
answer
58
views
unidiff: encode file move?
Is there a way to encode moving a file path that patch respects?
echo '# Story' > story.txt
patch -Nfu << EOF
--- story.txt
+++ kitty.txt
@@ -1 +1 @@
-# Story
+# Kitty
EOF
echo "...
3
votes
0
answers
93
views
Myers diff with a custom cost function
Myers diff algorithm treats insertion and removal equally at the same cost and treats equality at zero cost (free path).
I tried to alter this behavior with supplying a custom cost function which to ...
0
votes
0
answers
25
views
How to show more meaningful git differences despite of the source code vertical alignment changes of Visual Studio Data-tier Application?
We are using Visual Sutdio Data-tier Application, a.k.a. SQL Server Database Project, to control the SQL source code of our database, including the table definitions.
As an example, we are making ...
3
votes
0
answers
95
views
Modifying myers diff by identifying compound units and treating them as 1 single insertion or removal
Myers diff algorithm works at character level and identifies insertion, removal or no-operation at each step. So for example, comparing PQRSXRSYRSZ (old string presented horizontally) and PQRSARSXRSY (...
1
vote
1
answer
155
views
Why is calling free causing segfault [closed]
I am trying to implement the myers diff algorithm in C.
I am getting a segfault when trying to free the memory previously allocated to the path variable, used to store the x values for each iteration ...
1
vote
0
answers
54
views
git blame only commits on feature-branch after master?
If I've branched off master onto feat-branch, can I run git blame on a file and only highlight/emphasize lines changed in commits after I diverged from master?
This would be helpful for when I am ...
1
vote
0
answers
65
views
VS Code `editor.edit` blocking for extended period during streaming diff in extension
I'm developing a VS Code extension that performs a streaming diff on a selected range of text. The extension receives new lines meant to replace the selected text from from a WebSocket connection and ...
1
vote
0
answers
104
views
SourceTree + PCB git diff tool (allspice.io)
I am using SourceTree latest version (as of 13/01/2025) v3.4.21 and I have a problem while using a third-party tool that helps me see grpahically the diffs between versions for PCB files in Altium (....
1
vote
1
answer
87
views
How to show the diff in all files having leftover conflict marker?
I know git diff --check will list all files having leftover conflict marker, but it doesn't actually show the diff. I think the command to show the diff in all files having leftover conflict marker ...
0
votes
1
answer
45
views
VS diffFile command does not show diff
Trying to compare 2 files from as adviced here Compare two files in Visual Studio
This only says new lines added (the + sign) , but does not show the diff , what can be wrong here ? Tried multiple ...
3
votes
1
answer
213
views
Avoiding the Myers Diff Algorithm "Wrong-End" Problem
I've been working on a project developing a more extensible way to create synopses of ancient texts (essentially side-by-side comparisons with the diffs highlighted, but with options to focus only on ...
0
votes
0
answers
100
views
Git apply: how to ignore changes marked as "Binary files ... differ"?
I'm storing lots of deb's and rpm's as diffs from a few selected "seed" packages. The diffs are generated using git diff and applied using git apply. I only need the source files in the ...
1
vote
1
answer
59
views
Struggling to store character positions in array
Very sorry about the ambiguous title as I simply don't know how to describe my problem in one line.
I have a string that keeps changing at random intervals. I want to be able to track changes to that ...
0
votes
1
answer
80
views
Recreate exact output from this Linux diff command in a Windows System
I'm losing my mind trying to recreate the output of the following Linux command in a Windows Environment:
diff --old-line-format='%L' --new-line-format='' --unchanged-line-format='' file1 file2 | grep ...
0
votes
0
answers
94
views
Three-way diff between three git versions in IntelliJ
Does IntelliJ provide three-way diff natively (ie. without an external merge tool being configured)?
The docs have plenty of references, but none of them actually pan out:
Seems available only if the ...
0
votes
0
answers
14
views
Can hg log --patch hide content of deleted files?
I'd like to browse the changes in a Mercurial repo by using hg log --verbose --patch. For file copies (without changes) this results in the desired output, the diff not showing the file contents but ...
0
votes
0
answers
207
views
How to compare the DIFF of two merges/merge requests with different bases
Is there a good way to compare the diff (so basically the diff of the diff) between two merges or even better two potential merges (aka merge requests).
For some context the branching pattern: There ...
7
votes
1
answer
2k
views
IntelliJ not showing diff in commit window
I use Windows and IntelliJ IDEA 2024.2.4. (Ultimate Edition)
I've been looking at all options and I do not find anything where I can change this behaviour... When I commit I see a window which does ...
0
votes
2
answers
87
views
How to tell with git whether an original commit that was reversed is the same as the new recommit?
Commit history looks like this
1. aaa original code
2. bbb the change
3. ccc unrelated change 1
4. ddd reversed bbb for some reason
5. eee unrelated change 2
Now code author wants to merge a PR ...
2
votes
0
answers
102
views
dayjs: Wrong hours in diff
I have the following code fragment in node.js written in Typescript to calculate the Difference between two Dates:
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
import utc ...
2
votes
1
answer
94
views
git log with all commits but partial diffs
I would like a way to log certain commits and also submit path arguments so that the diff on those paths, if any, is shown for each commit as if those path arguments were supplied like git diff -- <...
0
votes
2
answers
40
views
rolling difference between a selected base code compared to other code in R
I have a code where there is a scenario (sc column) and a code name (cd column). I want to calculate the difference between all scenarios to the first one (so scenario 2-1, 3-1, etc. I have multiple ...
1
vote
0
answers
457
views
Automatically show diff of file and its swap file in neovim
When I have some work in neovim after it being closed without saving it will be stored in swap file. When I open the same file in neovim I am welcomed with this message:
E325: ATTENTION
Found a swap ...
0
votes
1
answer
182
views
JavaScript diff-match-patch shows diff between numbers incorrectly
I am using the diff-match-patch library in JavaScript to determine and visualize the differences between two configuration files for some components. It usually works well, however I've realized that ...
1
vote
1
answer
51
views
Why doesn't mnemonicPrefix work when diff'ing a stash?
If I run
git -c diff.mnemonicprefix=true diff stash@{0} $(git branch --show-current)
the first line in the output is still
diff --git a/file.txt b/file.txt
as if I hadn't used diff.mnemonicPrefix.
...
0
votes
2
answers
101
views
Revert this whitespace change
I seem to have a whitespace change in Git, but I can't revert it. I copied the content on the left-hand side and pasted it in my code in VS Code, but it doesn't detect any changes. How to revert this ...
0
votes
1
answer
495
views
Change in behaviour of Notepad++ plugins Compare and ComparePlus
The warning is: "Trying to compare files with different encodings - the result might be inaccurate and misleading. Compare anyway?"
The two files I'm comparing have been outputted from the ...
0
votes
0
answers
633
views
Bitbucket shows non-existent changes as diff
I'm creating a PR on Bitbucket from branch A to branch B. Both branches have a cypress.config.ts file, and the files are identical. However, it shows a diff like the one below, which is confusing.
...
3
votes
0
answers
632
views
Revert line by line in VS Code diff / compare files
VS Code has a very useful diff tool for comparing files (e.g. through the select file -> compare with selected dialogs). I really like this tool and use it a lot, but often wish that I could "...