From 5e1252a3c804b055b792ad0a9153a4e516272347 Mon Sep 17 00:00:00 2001
From: Tommy Guo
Date: Sun, 1 Feb 2026 21:13:57 -0500
Subject: [PATCH 1/7] Update copyright owner in LICENSE file
---
LICENSE | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/LICENSE b/LICENSE
index 7890b20..fab77b9 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2026 Tommy Guo
+Copyright (c) 2026 Xiyuan Guo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
From 0c6ae682f08314c1001c1c9829b7088a676734b8 Mon Sep 17 00:00:00 2001
From: Tommy Guo
Date: Sun, 1 Feb 2026 23:48:53 -0500
Subject: [PATCH 2/7] chore: default against HEAD
---
cmd/difi/main.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/difi/main.go b/cmd/difi/main.go
index 4ee1af0..12e5235 100644
--- a/cmd/difi/main.go
+++ b/cmd/difi/main.go
@@ -32,7 +32,7 @@ func main() {
os.Exit(0)
}
- target := "main"
+ target := "HEAD"
if flag.NArg() > 0 {
target = flag.Arg(0)
}
From d427999d3e2d94b9c9ef0b422c874b5c0352ad43 Mon Sep 17 00:00:00 2001
From: Tommy Guo
Date: Tue, 3 Feb 2026 10:25:57 -0500
Subject: [PATCH 3/7] Fix formatting issues in README.md
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 597a5ee..7cc8fef 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
-
+
## Why difi?
@@ -125,3 +125,4 @@ Contributions are especially welcome in:
+
From fc0fb2ba3670d37f31a07534b1c77d2224e6f31d Mon Sep 17 00:00:00 2001
From: Tommy Guo
Date: Tue, 3 Feb 2026 11:02:25 -0500
Subject: [PATCH 4/7] Enhance README with Git integration and formatting
Updated README.md to include new sections for Git integration and improved formatting.
---
README.md | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 7cc8fef..13c5bcc 100644
--- a/README.md
+++ b/README.md
@@ -69,9 +69,7 @@ difi
(back to top)
-## Integrations
-
-#### Neovim
+## Neovim Integration
Get the ultimate review experience with **[difi.nvim](https://github.com/oug-t/difi.nvim)**.
@@ -86,6 +84,22 @@ Get the ultimate review experience with **[difi.nvim](https://github.com/oug-t/d
+(back to top)
+
+## Git Integration
+
+To use `difi` as a native git command (e.g., `git difi`), add it as an alias in your global git config:
+
+```bash
+git config --global alias.difi '!difi'
+```
+Now you can run it directly from git:
+```bash
+git difi
+```
+
+(back to top)
+
## Contributing
```bash
@@ -126,3 +140,4 @@ Contributions are especially welcome in:
+
From 4dbfae39c279695dbfa854c171b298322cdaa2d8 Mon Sep 17 00:00:00 2001
From: Tommy Guo
Date: Tue, 3 Feb 2026 12:48:34 -0500
Subject: [PATCH 5/7] docs: add issue and PR templates
---
.github/ISSUE_TEMPLATE/bug_report.md | 29 +++++++++++++++++++++++
.github/ISSUE_TEMPLATE/feature_request.md | 16 +++++++++++++
.github/PULL_REQUEST_TEMPLATE.md | 15 ++++++++++++
3 files changed, 60 insertions(+)
create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md
create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md
create mode 100644 .github/PULL_REQUEST_TEMPLATE.md
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..99a1b10
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,29 @@
+---
+name: 🐛 Bug Report
+about: Create a report to help us improve difi
+title: "[BUG] "
+labels: bug
+assignees: ""
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+
+1. Go to '...'
+2. Press keys '...'
+3. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Environment (please complete the following information):**
+
+- OS: [e.g. macOS / Linux / Windows]
+- Terminal Emulator: [e.g. iTerm2, Alacritty, tmux]
+- Difi Version: [e.g. v0.1.0 or commit hash]
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..404a36d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,16 @@
+---
+name: 🚀 Feature Request
+about: Suggest an idea for this project
+title: "[FEAT] "
+labels: enhancement
+assignees: ''
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex: I'm always frustrated when...
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..070da97
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,15 @@
+## Description
+Please include a summary of the change and which issue is fixed.
+
+Fixes # (issue)
+
+## Type of change
+- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
+- [ ] 🚀 New feature (non-breaking change which adds functionality)
+- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
+- [ ] 📚 Documentation update
+
+## Checklist:
+- [ ] My code follows the style guidelines of this project (`go fmt ./...`)
+- [ ] I have performed a self-review of my own code
+- [ ] I have added tests that prove my fix is effective or that my feature works
From b52f2d106ff361eb43916585910cba8c489fccbc Mon Sep 17 00:00:00 2001
From: Ludvig Noring
Date: Wed, 4 Feb 2026 10:31:54 +0100
Subject: [PATCH 6/7] Fix: Truncate long lines
---
internal/ui/model.go | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/internal/ui/model.go b/internal/ui/model.go
index 28e4973..2768bf0 100644
--- a/internal/ui/model.go
+++ b/internal/ui/model.go
@@ -11,6 +11,7 @@ import (
"github.com/charmbracelet/bubbles/viewport"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
+ "github.com/charmbracelet/x/ansi"
"github.com/oug-t/difi/internal/config"
"github.com/oug-t/difi/internal/git"
@@ -402,7 +403,7 @@ func (m *Model) updateSizes() {
}
m.fileList.SetSize(treeWidth, listHeight)
- m.diffViewport.Width = m.width - treeWidth - 2
+ m.diffViewport.Width = m.width - treeWidth - 4 // border (2) + padding (2) from tree pane
m.diffViewport.Height = listHeight
}
@@ -455,8 +456,14 @@ func (m Model) View() string {
end = len(m.diffLines)
}
+ // 5 for line number (Width 4 + MarginRight 1), 2 for indent
+ maxLineWidth := m.diffViewport.Width - 7
+ if maxLineWidth < 1 {
+ maxLineWidth = 1
+ }
+
for i := start; i < end; i++ {
- line := m.diffLines[i]
+ line := ansi.Truncate(m.diffLines[i], maxLineWidth, "")
var numStr string
mode := "relative"
From ce80530858d4ce2ed098450fbe6ef243879dc4ec Mon Sep 17 00:00:00 2001
From: Javier Tia
Date: Wed, 4 Feb 2026 15:37:40 -0600
Subject: [PATCH 7/7] docs: Add AUR installation instructions for Arch Linux
The README currently lacks installation instructions for Arch Linux
users, who represent a significant portion of the Linux community.
This forces Arch users to either build manually from source or use
the generic Go install method, both of which bypass the benefits of
package management (dependency tracking, easy updates, and system
integration).
Add AUR installation instructions offering both pre-built binary and
source-based options. This aligns with the existing package manager
approach used for macOS (Homebrew) and provides Arch users with a
native installation path that integrates with their system's package
management workflow.
Signed-off-by: Javier Tia
---
README.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/README.md b/README.md
index 13c5bcc..c417755 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,18 @@ brew install difi
go install github.com/oug-t/difi/cmd/difi@latest
```
+#### AUR (Arch Linux)
+
+**Binary (pre-built):**
+```bash
+pikaur -S difi-bin
+```
+
+**Build from source:**
+```bash
+pikaur -S difi
+```
+
#### Manual (Linux / Windows)
- Download the binary from Releases and add it to your `$PATH`.