lazyjj icon indicating copy to clipboard operation
lazyjj copied to clipboard

feat: Simple rebase (close #4)

Open peso opened this issue 5 months ago • 3 comments

This fix a documentation leftover from a previous PR for checking jj version, and adds a simple rebase feature.

peso avatar Jul 20 '25 06:07 peso

@istudyatuni or @dotdash - I need some help here. To me it seems like clippy stumbles over a line that does not exist. The error report points at line 942, but the file log_tab.rs only has 919 lines when I check out commit 476fb01612edc4777e609eadfc5752145f61660b.

There is no line with the specified content, however this PR does contain commit 968eaf76 which removed a & before a mouse_event.

What am I missing?

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/ui/log_tab.rs:942:25
    |
942 |                         &mouse_event,
    |                         ^^^^^^^^^^^^ help: change this to: `mouse_event`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#needless_borrow
    = note: `-D clippy::needless-borrow` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`

error: could not compile `lazyjj` (bin "lazyjj" test) due to 1 previous error

peso avatar Nov 21 '25 11:11 peso

The workflow doesn't test the PR's branch head, but the merge result of the PR branch and its destination (at the time of testing), i.e. the test for commit 476fb01 was effectively the same as the one for 9e029c2, which has line 942 as shown. See here:

Checking out the ref
  /usr/bin/git checkout --progress --force refs/remotes/pull/151/merge
  Note: switching to 'refs/remotes/pull/151/merge'.
  
...
  
  HEAD is now at 58314f7 Merge 476fb01612edc4777e609eadfc5752145f61660b into b61c5dc994465f4a4b63044209b33ba355f60284

dotdash avatar Nov 21 '25 11:11 dotdash

Ok, I'll rebase and push again.

peso avatar Nov 21 '25 11:11 peso

Nice! There's a crash if one tries to rebase a change onto itself, that should have the same check that squash has.

I added a proper error message display, so any error will be handled without a crash, including self-rebase.

peso avatar Dec 04 '25 18:12 peso

@dotdash please review again after the cleanup. Do you feel strongly about your suggestion that fn center_rect() should use ratatui functions? I have argued against it.

Note that the PR currently has one more contribution from @Edgpaez (key bindings + more info in dialog) which I guess will be squashed along with the rest of the PR.

peso avatar Dec 04 '25 18:12 peso

Hey @peso, I'm sorry I couldn't review the latest version yet. I have assigned a time slot on Saturday to have a look at the open PRs.

dotdash avatar Dec 04 '25 19:12 dotdash

I have assigned a time slot on Saturday to have a look at the open PRs.

Life had different plans :-( I got through some of the other open ones just now, but don't have the time/energy left to do this today. I'll squeeze it into my lunch break tomorrow

dotdash avatar Dec 07 '25 19:12 dotdash

If the centering works, I'm most likely fine with keeping the helper as is.

dotdash avatar Dec 07 '25 19:12 dotdash