Replies: 2 comments
-
|
No. I was thinking of implementing something like this in #4097 . I think it might be nicer as some version of For the evolog part of it, there is a discussion in #4129 |
Beta Was this translation helpful? Give feedback.
-
jj-fzf can restore a "missing" commit from successive snapshots in the op log (Ctrl+O). The same could be done from the evolog, just manually pick out the old commit, here 3ed8: ⮞ jj evolog -p -r @
@ srtvvyqx [email protected] 2024-12-06 04:04:42 c5fb70b4
│ (no description set)
│ diff --git a/data b/data
│ index 8e1e71d5ce..257cc5642c 100644
│ --- a/data
│ +++ b/data
│ @@ -1,1 +1,1 @@
│ -f1
│ +foo
○ srtvvyqx hidden [email protected] 2024-12-06 04:04:42 3ed80c55
│ (no description set)
│ diff --git a/data b/data
│ new file mode 100644
│ index 0000000000..8e1e71d5ce
│ --- /dev/null
│ +++ b/data
│ @@ -1,0 +1,1 @@
│ +f1
○ srtvvyqx hidden [email protected] 2024-12-06 04:04:24 29219075
(empty) (no description set)
⮞ jj new --no-edit --before srtvvyqx
Created new commit qmyzmvlr 5edb9771 (empty) (no description set)
Rebased 1 descendant commits
Working copy now at: srtvvyqx 2896819f (no description set)
Parent commit : qmyzmvlr 5edb9771 (empty) (no description set)
⮞ jj restore -f 3ed80c55 -t @- --restore-descendants
Created qmyzmvlr aad51e49 (no description set)
Rebased 1 descendant commits (while preserving their content)
Working copy now at: srtvvyqx 59615359 (no description set)
Parent commit : qmyzmvlr aad51e49 (no description set)
⮞ jj log -p -n2
@ srtvvyqx [email protected] 2024-12-06 04:05:48 59615359
│ (no description set)
│ diff --git a/data b/data
│ index 8e1e71d5ce..257cc5642c 100644
│ --- a/data
│ +++ b/data
│ @@ -1,1 +1,1 @@
│ -f1
│ +foo
○ qmyzmvlr [email protected] 2024-12-06 04:05:48 git_head() aad51e49
│ (no description set)
│ diff --git a/data b/data
│ new file mode 100644
│ index 0000000000..8e1e71d5ce
│ --- /dev/null
│ +++ b/data
│ @@ -1,0 +1,1 @@
│ +f1 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to "split" a commit using the
evolog?I.e., given a change
fooat commitf2but previouslyf1, is there an easy way to restoref1, then recreatef2as a new commit on top of that?(One way to accomplish this is
jj duplicate f1,jj new <the new commit>,jj restore --from f2, but I'm wondering if there's an easier way.)Beta Was this translation helpful? Give feedback.
All reactions