Skip to content

Commit e07ef45

Browse files
committed
fix: diff view does not use --cached for unmerged changes
1 parent bf1e713 commit e07ef45

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
## Fixed
1515
- Web UI workspace view labels changes as Merge Conflict if there are unmerged changes (#890)
16+
- Web UI workspace view displays diff correctly for files with merge conflicts (#898)
1617

1718
## [2.14.0] - 2025-11-07
1819

git-webui/release/share/git-webui/webui/js/git-webui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3210,7 +3210,7 @@ webui.NewChangedFilesView = function(workspaceView) {
32103210
self.fileToDiff = $(element).attr("data-filename");
32113211
var indexStatus = $(element).attr("data-index-status");
32123212
var gitOpts = [];
3213-
if (indexStatus != " ") {
3213+
if ((indexStatus != " ") && (indexStatus != "U")) {
32143214
gitOpts.push("--cached");
32153215
}
32163216
workspaceView.diffView.update("diff", gitOpts, self.fileToDiff, "stage");

git-webui/src/share/git-webui/webui/js/git-webui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3210,7 +3210,7 @@ webui.NewChangedFilesView = function(workspaceView) {
32103210
self.fileToDiff = $(element).attr("data-filename");
32113211
var indexStatus = $(element).attr("data-index-status");
32123212
var gitOpts = [];
3213-
if (indexStatus != " ") {
3213+
if ((indexStatus != " ") && (indexStatus != "U")) {
32143214
gitOpts.push("--cached");
32153215
}
32163216
workspaceView.diffView.update("diff", gitOpts, self.fileToDiff, "stage");

0 commit comments

Comments
 (0)