Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Reverse commit range before yanking #2441

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Esgariot
Copy link

@Esgariot Esgariot commented Dec 3, 2024

Produce <oldest>^..<newest> when yanking consecutive range.
Now, given consecutive marked selection, gitui's selection matches
git log's output in commit range.

This Pull Request fixes/closes #2246.

It changes the following:

Produce <oldest>^..<newest> when yanking consecutive range.
Now, given consecutive marked selection, gitui's selection matches
git log's output in commit range.

I followed the checklist:

  • I added unittests
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

Produce `<oldest>^..<newest>` when yanking consecutive range.
Now, given consecutive marked selection, gitui's selection matches
`git log`'s output in commit range.
@Esgariot
Copy link
Author

Esgariot commented Dec 3, 2024

output from

make check

cargo fmt -- --check
cargo clippy --workspace --all-features
warning: the following explicit lifetimes could be elided: 'a
  --> scopetime/src/lib.rs:35:6
   |
35 | impl<'a> Drop for ScopeTimeLog<'a> {
   |      ^^                        ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
   |
35 - impl<'a> Drop for ScopeTimeLog<'a> {
35 + impl Drop for ScopeTimeLog<'_> {
   |

warning: `scopetime` (lib) generated 1 warning (run `cargo clippy --fix --lib -p scopetime` to apply 1 suggestion)
warning: [email protected]: buildname 'nightly 2024-12-03 (3a861dc)'
    Checking asyncgit v0.26.3 (/home/esgariot/Development/gitui/asyncgit)
    Checking filetreelist v0.5.2 (/home/esgariot/Development/gitui/filetreelist)
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
   --> filetreelist/src/filetreeitems.rs:276:2
    |
276 | /     fn update_visibility(
277 | |         &mut self,
278 | |         prefix: &Option<PathBuf>,
    | |                 ---------------- help: change this to: `Option<&PathBuf>`
279 | |         start_idx: usize,
...   |
325 | |         }
326 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option
note: the lint level is defined here
   --> filetreelist/src/lib.rs:10:53
    |
10  | #![deny(clippy::all, clippy::perf, clippy::nursery, clippy::pedantic)]
    |                                                     ^^^^^^^^^^^^^^^^
    = note: `#[deny(clippy::ref_option)]` implied by `#[deny(clippy::pedantic)]`

error: could not compile `filetreelist` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: empty line after doc comment
  --> asyncgit/src/sync/config.rs:73:1
   |
73 | / /// get string from config
74 | |
   | |_
75 | / pub fn get_config_string(
76 | |     repo_path: &RepoPath,
77 | |     key: &str,
78 | | ) -> Result<Option<String>> {
   | |___________________________- the comment documents this function
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
note: the lint level is defined here
  --> asyncgit/src/lib.rs:11:9
   |
11 | #![deny(clippy::all, clippy::perf, clippy::nursery, clippy::pedantic)]
   |         ^^^^^^^^^^^
   = note: `#[deny(clippy::empty_line_after_doc_comments)]` implied by `#[deny(clippy::all)]`
   = help: if the empty line is unintentional remove it

error: the following explicit lifetimes could be elided: 'a
  --> asyncgit/src/sync/logwalker.rs:13:6
   |
13 | impl<'a> Eq for TimeOrderedCommit<'a> {}
   |      ^^                           ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[deny(clippy::needless_lifetimes)]` implied by `#[deny(clippy::all)]`
help: elide the lifetimes
   |
13 - impl<'a> Eq for TimeOrderedCommit<'a> {}
13 + impl Eq for TimeOrderedCommit<'_> {}
   |

error: the following explicit lifetimes could be elided: 'a
  --> asyncgit/src/sync/logwalker.rs:15:6
   |
15 | impl<'a> PartialEq for TimeOrderedCommit<'a> {
   |      ^^                                  ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
15 - impl<'a> PartialEq for TimeOrderedCommit<'a> {
15 + impl PartialEq for TimeOrderedCommit<'_> {
   |

error: the following explicit lifetimes could be elided: 'a
  --> asyncgit/src/sync/logwalker.rs:21:6
   |
21 | impl<'a> PartialOrd for TimeOrderedCommit<'a> {
   |      ^^                                   ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
21 - impl<'a> PartialOrd for TimeOrderedCommit<'a> {
21 + impl PartialOrd for TimeOrderedCommit<'_> {
   |

error: the following explicit lifetimes could be elided: 'a
  --> asyncgit/src/sync/logwalker.rs:27:6
   |
27 | impl<'a> Ord for TimeOrderedCommit<'a> {
   |      ^^                            ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
27 - impl<'a> Ord for TimeOrderedCommit<'a> {
27 + impl Ord for TimeOrderedCommit<'_> {
   |

error: could not compile `asyncgit` (lib) due to 5 previous errors
make: *** [Makefile:92: clippy] Błąd 101

lists errors unrelated to changes this pull request introduced

@Esgariot Esgariot marked this pull request as ready for review December 3, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copied hash ranges are backwards
1 participant