gitui-org / gitui-org/gitui

Copied hash ranges are backwards

Open
#2,246 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
22.5k
Forks
773
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I've been using the hash range copy feature introduced in #1288 to do a lot of cherry-picking, a large majority of which are consecutive ranges. However I can't use the range as-is and would have to manually reverse it myself, since marks are sorted by latest first. Thank you!

EDIT(2024/06/28): I've noticed that even for non-consecutive ranges the order is reversed. If the order of marks is not depended on anything else in gitui, I think it's desirable to reverse it for ease of use.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to the Log screen
2. Mark a consecutive range of commits and copy to clipboard
3. Try to `git cherry-pick` with the copied range
4. `error: empty commit set passed`

**Expected behavior**
It would be more convenient for hash ranges to be sorted from oldest to latest.

**Screenshots**
N/A

**Context**
- OS/Distro + Version: Pop_OS 22.04
- GitUI Version: nightly 2024-05-19
- Rust version: 1.78.0

**Additional context**
N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.