gitui-org / gitui-org/gitui

Conflicted File Missing Diff and Content in Conflict State

Abierto
#2,865 0 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Rust
Estrellas
22.5k
Forks
773
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Describe the bug**
When a merge conflict occurs, GitUI fails to display the conflict markers or the diff for the conflicted file. Instead of showing the diff (e.g., between `HEAD` and the incoming branch), the diff view appears blank or displays an incorrect file size, making it difficult to resolve conflicts within the UI.

**To Reproduce**
Steps to reproduce the behavior:

1. Initialize a Git repository.
2. Create `file.txt` with "Original Line" on `master`.
3. Create branch `feature` from `master`.
4. On `master`, change `file.txt` to "Master Line" and commit.
5. On `feature`, change `file.txt` to "Feature Line" and commit.
6. On `master`, run `git merge feature` to trigger a conflict.
7. Open `gitui`.
8. Navigate to the "Status" tab and select the conflicted `file.txt`.
9. Observe that the diff view is blank or incorrect.

**Expected behavior**
GitUI should correctly display the conflict markers (e.g., `<<<<<<<`, `=======`, `>>>>>>>`) and provide a diff view that allows the user to see the differences between branches and ideally use the "Stage" or "Resolve" functions.

**Screenshots**

Image

Image

**Context**

- OS/Distro + Version: `Linux localhost 6.12.38+kali-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.12.38-1kali1 (2025-08-12) x86_64 GNU/Linux`
- GitUI Version: `gitui nightly 2025-12-15`
- Rust version: `rustc 1.93.1 (01f6ddf75 2026-02-11)`

**Additional context**
Current Git state and file content for reference:

### Git Status

```text
On branch master
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)

Unmerged paths:
(use "git add ..." to mark resolution)
both modified: file.txt
```

### File Content (`file.txt`)

```text
<<<<<<< HEAD
Master Line
=======
Feature Line
>>>>>>> feature
```

### Git Diff

```diff
diff --cc file.txt
index 8ba2485,60a7231..0000000
--- a/file.txt
+++ b/file.txt
@@@ -1,1 -1,1 +1,5 @@@
++<<<<<<< HEAD
+Master Line
++=======
+ Feature Line
++>>>>>>> feature
```

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Reproduce el conflicto de merge con file.txt, luego inspecciona el archivo en conflicto desde la pestaña Status y sigue cómo GitUI obtiene el diff y el tamaño del archivo. Se considera terminado cuando los marcadores de conflicto y las diferencias entre ramas aparecen correctamente en la vista de diff, y las acciones existentes Stage o Resolve siguen siendo utilizables.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
git, rust
Área
cli, devtools
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.