summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Oram <dev@mitmaro.ca>2024-06-26 22:27:58 -0230
committerTim Oram <dev@mitmaro.ca>2024-06-26 21:18:40 -0400
commit30c7199875f1156be214d28da637f538010ecc1c (patch)
treec264543d3e9ebf0bb0e81dc8970a2c67c6a81f77
parent2d458aa97cb9b2ba9cc59a5f11b6ba7a9c931f5b (diff)
Fix reversed file names reversed in show commit2.4.1
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.
-rw-r--r--CHANGELOG.md9
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--README.md2
-rw-r--r--src/modules/show_commit/tests.rs12
-rw-r--r--src/modules/show_commit/util.rs8
6 files changed, 19 insertions, 16 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 865168e..aba8dfc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,9 +3,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).
+## [2.4.1] - 2024-06-26
+### Fixed
+- Renamed and copied file order reversed in show commit view ([#926](https://github.com/MitMaro/git-interactive-rebase-tool/pull/926))
+
## [2.4.0] - 2024-06-13
### Added
-- Add support for `NO_COLOR` environment variable ([#896](https://github.com/MitMaro/git-interactive-rebase-tool/pull/896))
+- Add support for `NO_COLOR` environment variable ([#896](https://github.com/MitMaro/git-interactive-rebase-tool/pull/896))
- Post modified line exec command ([#888](https://github.com/MitMaro/git-interactive-rebase-tool/pull/890))
### Changed
@@ -184,7 +188,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Added
- Initial project release
-[Unreleased]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.4.0...HEAD
+[Unreleased]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.4.1...HEAD
+[2.4.1]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.4.0...2.4.1
[2.4.0]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.3.0...2.4.0
[2.3.0]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.2.1...2.3.0
[2.2.1]: https://github.com/MitMaro/git-interactive-rebase-tool/compare/2.2.0...2.2.1
diff --git a/Cargo.lock b/Cargo.lock
index 90ad626..d67b020 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -319,7 +319,7 @@ dependencies = [
[[package]]
name = "git-interactive-rebase-tool"
-version = "2.4.0"
+version = "2.4.1"
dependencies = [
"anyhow",
"bitflags 2.5.0",
diff --git a/Cargo.toml b/Cargo.toml
index a145dc9..18f8031 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "git-interactive-rebase-tool"
-version = "2.4.0"
+version = "2.4.1"
authors = ["Tim Oram <dev@mitmaro.ca>"]
license = "GPL-3.0-or-later"
description = "Full feature terminal based sequence editor for git interactive rebase."
diff --git a/README.md b/README.md
index 96fcc90..9855c7c 100644
--- a/README.md
+++ b/README.md
@@ -9,8 +9,6 @@ Native cross-platform full feature terminal based [sequence editor][git-sequence
[![Git Interactive Rebase Tool](/docs/assets/images/girt-demo.gif?raw=true)](https://youtu.be/q3tzb-gQC0w)
-**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).**
-
## Table of Contents
* [Features](./README.md#features)
diff --git a/src/modules/show_commit/tests.rs b/src/modules/show_commit/tests.rs
index 6d0c1f1..8e86b5d 100644
--- a/src/modules/show_commit/tests.rs
+++ b/src/modules/show_commit/tests.rs
@@ -386,10 +386,10 @@ fn render_overview_with_file_stats() {
test_context.build_view_data(&mut module),
"{IndicatorColor}0{Normal} files with {DiffAddColor}0{Normal} insertions and \
{DiffRemoveColor}0{Normal} deletions",
- "{DiffChangeColor} renamed: {DiffRemoveColor}file.1b{Normal} → {DiffAddColor}file.1a",
+ "{DiffChangeColor} renamed: {DiffRemoveColor}file.1a{Normal} → {DiffAddColor}file.1b",
"{DiffAddColor} added: file.2a",
"{DiffRemoveColor} deleted: file.3a",
- "{DiffAddColor} copied: {Normal}file.4b → {DiffAddColor}file.4a",
+ "{DiffAddColor} copied: {Normal}file.4a → {DiffAddColor}file.4b",
"{DiffChangeColor}modified: file.5a",
"{DiffChangeColor} changed: file.6a",
"{Normal} unknown: file.7a"
@@ -455,10 +455,10 @@ fn render_overview_with_file_stats_compact() {
Skip 2,
test_context.build_view_data(&mut module),
"{IndicatorColor}0{Normal} / {DiffAddColor}0{Normal} / {DiffRemoveColor}0",
- "{DiffChangeColor}R {DiffRemoveColor}file.1b{Normal}→{DiffAddColor}file.1a",
+ "{DiffChangeColor}R {DiffRemoveColor}file.1a{Normal}→{DiffAddColor}file.1b",
"{DiffAddColor}A file.2a",
"{DiffRemoveColor}D file.3a",
- "{DiffAddColor}C {Normal}file.4b→{DiffAddColor}file.4a",
+ "{DiffAddColor}C {Normal}file.4a→{DiffAddColor}file.4b",
"{DiffChangeColor}M file.5a",
"{DiffChangeColor}T file.6a",
"{Normal}X file.7a"
@@ -735,13 +735,13 @@ fn render_diff_basic_file_stats() {
{DiffRemoveColor}0{Normal} deletions",
"{BODY}",
"{Normal}{Pad(―)}",
- "{DiffChangeColor} renamed: {DiffRemoveColor}file.1b{Normal} → {DiffAddColor}file.1a",
+ "{DiffChangeColor} renamed: {DiffRemoveColor}file.1a{Normal} → {DiffAddColor}file.1b",
"{Normal}{Pad(―)}",
"{DiffAddColor} added: file.2a",
"{Normal}{Pad(―)}",
"{DiffRemoveColor} deleted: file.3a",
"{Normal}{Pad(―)}",
- "{DiffAddColor} copied: {Normal}file.4b → {DiffAddColor}file.4a",
+ "{DiffAddColor} copied: {Normal}file.4a → {DiffAddColor}file.4b",
"{Normal}{Pad(―)}",
"{DiffChangeColor}modified: file.5a",
"{Normal}{Pad(―)}",
diff --git a/src/modules/show_commit/util.rs b/src/modules/show_commit/util.rs
index ce75523..9ee897e 100644
--- a/src/modules/show_commit/util.rs
+++ b/src/modules/show_commit/util.rs
@@ -84,17 +84,17 @@ pub(super) fn get_stat_item_segments(
Status::Copied => {
vec![
LineSegment::new_with_color(status_name.as_str(), color),
- LineSegment::new_with_color(to_name.to_str().unwrap_or("invalid"), DisplayColor::Normal),
+ LineSegment::new_with_color(from_name.to_str().unwrap_or("invalid"), DisplayColor::Normal),
LineSegment::new(to_file_indicator),
- LineSegment::new_with_color(from_name.to_str().unwrap_or("invalid"), DisplayColor::DiffAddColor),
+ LineSegment::new_with_color(to_name.to_str().unwrap_or("invalid"), DisplayColor::DiffAddColor),
]
},
Status::Renamed => {
vec![
LineSegment::new_with_color(status_name.as_str(), color),
- LineSegment::new_with_color(to_name.to_str().unwrap_or("invalid"), DisplayColor::DiffRemoveColor),
+ LineSegment::new_with_color(from_name.to_str().unwrap_or("invalid"), DisplayColor::DiffRemoveColor),
LineSegment::new(to_file_indicator),
- LineSegment::new_with_color(from_name.to_str().unwrap_or("invalid"), DisplayColor::DiffAddColor),
+ LineSegment::new_with_color(to_name.to_str().unwrap_or("invalid"), DisplayColor::DiffAddColor),
]
},
_ => {