diff view in (git) history is now displayed in reversed order
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 25
### What happened
The diff panel when selecting 2 commits (from `History`) displays files in the wrong order:
`commit | older-commit` instead of
`older-commit | commit`.
### Language / Project Type / NetBeans Component
any file with a git history
### How to reproduce
Pre-requisites:
- have a file with at least 2 git commits
- have both some deletions and additions on different lines (optional)
How to proceed:
- open a file with some git history
- at the top left corner click `History` (next to `Source`)
- click on 1 commit in the file history, the diff view below is split as follows:
`selected-commit | current file`
- click on the right panel (current file)
- add a new line, it will appear in green (addition) in that same panel (current file)
- delete a line, the deleted line will appear in red (deletion) in the left panel (commit)
- now go back to the git history above, select a git commit (let's call it `commit-2025`), hold the command key (on mac) or shift and select an older commit (let's call it `commit-2024`)
- in the panel below the commits are displayed in reversed chronological order:
`commit-2025 | commit-2024` instead of:
`commit-2024 | commit-2025` to be consistent with the order when selecting only 1 file and coloring scheme.
The order being reverse, the coloring system (which would be correct for `commit-2024 | commit-2025`) is also wrong, green for deletion and red for addition.
### Did this work correctly in an earlier version?
Apache NetBeans 21 or earlier
### Operating System
MacOS 15.4
### JDK
the one coming bundled with the installer
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
Yes
Contributor guide
Research direction
The issue is in the NetBeans History view and its two-commit diff panel; start by reproducing the reversed ordering with two Git commits and compare it with the single-commit view. Done means the older commit is on the left, the newer commit is on the right, and additions and deletions use the corresponding colors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100