Skip to content

Commit 30c7199

Browse files
committed
Fix reversed file names reversed in show commit
The source and destination paths in the show commit summary and diff views were reversed from the correct order. This ensures the correct order of these file paths.
1 parent 2d458aa commit 30c7199

File tree

6 files changed

+19
-16
lines changed

6 files changed

+19
-16
lines changed

CHANGELOG.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/).
55

6+
## [2.4.1] - 2024-06-26
7+
### Fixed
8+
- Renamed and copied file order reversed in show commit view ([#926](https://github.com/MitMaro/git-interactive-rebase-tool/pull/926))
9+
610
## [2.4.0] - 2024-06-13
711
### Added
8-
- Add support for `NO_COLOR` environment variable ([#896](https://github.com/MitMaro/git-interactive-rebase-tool/pull/896))
12+
- Add support for `NO_COLOR` environment variable ([#896](https://github.com/MitMaro/git-interactive-rebase-tool/pull/896))
913
- Post modified line exec command ([#888](https://github.com/MitMaro/git-interactive-rebase-tool/pull/890))
1014

1115
### Changed
@@ -184,7 +188,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
184188
### Added
185189
- Initial project release
186190

187-
[Unreleased]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.4.0...HEAD
191+
[Unreleased]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.4.1...HEAD
192+
[2.4.1]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.4.0...2.4.1
188193
[2.4.0]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.3.0...2.4.0
189194
[2.3.0]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.2.1...2.3.0
190195
[2.2.1]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.2.0...2.2.1

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "git-interactive-rebase-tool"
3-
version = "2.4.0"
3+
version = "2.4.1"
44
authors = ["Tim Oram <[email protected]>"]
55
license = "GPL-3.0-or-later"
66
description = "Full feature terminal based sequence editor for git interactive rebase."

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Native cross-platform full feature terminal based [sequence editor][git-sequence
99

1010
[![Git Interactive Rebase Tool](/docs/assets/images/girt-demo.gif?raw=true)](https://youtu.be/q3tzb-gQC0w)
1111

12-
**This is the documentation for the development build. For the current stable release, please use the [2.4.x documentation](https://github.com/MitMaro/git-interactive-rebase-tool/tree/2.4.0/README.md).**
13-
1412
## Table of Contents
1513

1614
* [Features](./README.md#features)

src/modules/show_commit/tests.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,10 @@ fn render_overview_with_file_stats() {
386386
test_context.build_view_data(&mut module),
387387
"{IndicatorColor}0{Normal} files with {DiffAddColor}0{Normal} insertions and \
388388
{DiffRemoveColor}0{Normal} deletions",
389-
"{DiffChangeColor} renamed: {DiffRemoveColor}file.1b{Normal} → {DiffAddColor}file.1a",
389+
"{DiffChangeColor} renamed: {DiffRemoveColor}file.1a{Normal} → {DiffAddColor}file.1b",
390390
"{DiffAddColor} added: file.2a",
391391
"{DiffRemoveColor} deleted: file.3a",
392-
"{DiffAddColor} copied: {Normal}file.4b → {DiffAddColor}file.4a",
392+
"{DiffAddColor} copied: {Normal}file.4a → {DiffAddColor}file.4b",
393393
"{DiffChangeColor}modified: file.5a",
394394
"{DiffChangeColor} changed: file.6a",
395395
"{Normal} unknown: file.7a"
@@ -455,10 +455,10 @@ fn render_overview_with_file_stats_compact() {
455455
Skip 2,
456456
test_context.build_view_data(&mut module),
457457
"{IndicatorColor}0{Normal} / {DiffAddColor}0{Normal} / {DiffRemoveColor}0",
458-
"{DiffChangeColor}R {DiffRemoveColor}file.1b{Normal}→{DiffAddColor}file.1a",
458+
"{DiffChangeColor}R {DiffRemoveColor}file.1a{Normal}→{DiffAddColor}file.1b",
459459
"{DiffAddColor}A file.2a",
460460
"{DiffRemoveColor}D file.3a",
461-
"{DiffAddColor}C {Normal}file.4b→{DiffAddColor}file.4a",
461+
"{DiffAddColor}C {Normal}file.4a→{DiffAddColor}file.4b",
462462
"{DiffChangeColor}M file.5a",
463463
"{DiffChangeColor}T file.6a",
464464
"{Normal}X file.7a"
@@ -735,13 +735,13 @@ fn render_diff_basic_file_stats() {
735735
{DiffRemoveColor}0{Normal} deletions",
736736
"{BODY}",
737737
"{Normal}{Pad(―)}",
738-
"{DiffChangeColor} renamed: {DiffRemoveColor}file.1b{Normal} → {DiffAddColor}file.1a",
738+
"{DiffChangeColor} renamed: {DiffRemoveColor}file.1a{Normal} → {DiffAddColor}file.1b",
739739
"{Normal}{Pad(―)}",
740740
"{DiffAddColor} added: file.2a",
741741
"{Normal}{Pad(―)}",
742742
"{DiffRemoveColor} deleted: file.3a",
743743
"{Normal}{Pad(―)}",
744-
"{DiffAddColor} copied: {Normal}file.4b → {DiffAddColor}file.4a",
744+
"{DiffAddColor} copied: {Normal}file.4a → {DiffAddColor}file.4b",
745745
"{Normal}{Pad(―)}",
746746
"{DiffChangeColor}modified: file.5a",
747747
"{Normal}{Pad(―)}",

src/modules/show_commit/util.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@ pub(super) fn get_stat_item_segments(
8484
Status::Copied => {
8585
vec![
8686
LineSegment::new_with_color(status_name.as_str(), color),
87-
LineSegment::new_with_color(to_name.to_str().unwrap_or("invalid"), DisplayColor::Normal),
87+
LineSegment::new_with_color(from_name.to_str().unwrap_or("invalid"), DisplayColor::Normal),
8888
LineSegment::new(to_file_indicator),
89-
LineSegment::new_with_color(from_name.to_str().unwrap_or("invalid"), DisplayColor::DiffAddColor),
89+
LineSegment::new_with_color(to_name.to_str().unwrap_or("invalid"), DisplayColor::DiffAddColor),
9090
]
9191
},
9292
Status::Renamed => {
9393
vec![
9494
LineSegment::new_with_color(status_name.as_str(), color),
95-
LineSegment::new_with_color(to_name.to_str().unwrap_or("invalid"), DisplayColor::DiffRemoveColor),
95+
LineSegment::new_with_color(from_name.to_str().unwrap_or("invalid"), DisplayColor::DiffRemoveColor),
9696
LineSegment::new(to_file_indicator),
97-
LineSegment::new_with_color(from_name.to_str().unwrap_or("invalid"), DisplayColor::DiffAddColor),
97+
LineSegment::new_with_color(to_name.to_str().unwrap_or("invalid"), DisplayColor::DiffAddColor),
9898
]
9999
},
100100
_ => {

0 commit comments

Comments
 (0)