Skip to content

feat: Simple rebase (close #4)#151

Merged
dotdash merged 6 commits into
Cretezy:mainfrom
peso:rebase
Dec 8, 2025
Merged

feat: Simple rebase (close #4)#151
dotdash merged 6 commits into
Cretezy:mainfrom
peso:rebase

Conversation

@peso

@peso peso commented Jul 20, 2025

Copy link
Copy Markdown
Contributor

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

@peso

peso commented Nov 21, 2025

Copy link
Copy Markdown
Contributor Author

@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 476fb01.

There is no line with the specified content, however this PR does contain commit 968eaf7 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

@dotdash

dotdash commented Nov 21, 2025

Copy link
Copy Markdown
Collaborator

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

@peso

peso commented Nov 21, 2025

Copy link
Copy Markdown
Contributor Author

Ok, I'll rebase and push again.

Comment thread src/ui/rebase_popup.rs
Comment thread src/ui/rebase_popup.rs

@dotdash dotdash left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

This works similar to squash:
  @ is the source rev, highlight is the target rev.
For example rebase onto yourself.
@peso

peso commented Dec 4, 2025

Copy link
Copy Markdown
Contributor Author

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

peso commented Dec 4, 2025

Copy link
Copy Markdown
Contributor Author

@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.

@dotdash

dotdash commented Dec 4, 2025

Copy link
Copy Markdown
Collaborator

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

dotdash commented Dec 7, 2025

Copy link
Copy Markdown
Collaborator

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

dotdash commented Dec 7, 2025

Copy link
Copy Markdown
Collaborator

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

Comment thread src/ui/rebase_popup.rs Outdated
Comment thread src/ui/rebase_popup.rs Outdated
@dotdash
dotdash merged commit ca32368 into Cretezy:main Dec 8, 2025
10 checks passed
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.

3 participants