ok/jj
1
0
Fork 0
forked from mirrors/jj
Commit graph

13 commits

Author SHA1 Message Date
Samuel Tardieu
efceccb17d refactor: separate timestamp related utilities in time_util module 2023-01-14 16:07:09 +01:00
Ilya Grigoriev
dac80ef88c Rename diff_edit.rs to merge_tools.rs
This is important especially since we're about to rename the `touchup` command into `diffedit`.
2022-12-17 22:26:59 -08:00
Yuya Nishihara
5e490f310f cli: extract show_diff*() functions and structs to new module
I think these functions are big enough to be separated from random chunk
of command functions.
2022-12-14 15:24:50 +09:00
Martin von Zweigbergk
d8feed9be4 copyright: change from "Google LLC" to "The Jujutsu Authors"
Let's acknowledge everyone's contributions by replacing "Google LLC"
in the copyright header by "The Jujutsu Authors". If I understand
correctly, it won't have any legal effect, but maybe it still helps
reduce concerns from contributors (though I haven't heard any
concerns).

Google employees can read about Google's policy at
go/releasing/contributions#copyright.
2022-11-28 06:05:45 -10:00
Benjamin Saunders
472b6926e5 cli: define drop+signal guard helper 2022-11-06 18:15:22 -08:00
Benjamin Saunders
f11b3d2476 cli: factor progress reporting out into its own module 2022-10-24 12:52:41 -07:00
Martin von Zweigbergk
7f6cf1e6d9 cli: extract new cli_util module
This commit moves much of the `commands` module that isn't specific to
a particular command into a new `cli_util`.

Much of this is actually not even CLI-specific, so we should move that
further down into the library, but that can come later. That includes
the code in `WorkspaceCommandHelper` for snapshotting the working copy
and automatically importing/exporting to a colocated Git working copy.
2022-09-24 07:28:10 -07:00
Martin von Zweigbergk
b654a1fe84 cleanup: remove extern crate declarations
`extern crate` is no longer needed since edition 2018.
2022-09-21 22:24:09 -07:00
Martin von Zweigbergk
8289e87423 cli: move config-reading to new config module 2022-05-10 10:21:22 -07:00
Martin von Zweigbergk
710d51c45b tests: move testutils from src/ to tests/ 2022-04-02 14:22:58 -07:00
Martin von Zweigbergk
b50ef1410d styler: rename Styler to more standard Formatter 2021-06-05 08:38:28 -07:00
Martin von Zweigbergk
b820eddde3 commands: add an interactive mode for jj restore
This adds an interactive mode for `jj restore`. It works by first
creating two temporary directories with the contents of the subset of
files that differ between the two trees, and then letting the user
edit the directory representing the right/after side. This has some
advantages compared to the interactive modes in Git and Mercurial:

 * It lets the user edit the final state as opposed to the diff itself
   (depending on the diff tool, of course). I think most users find it
   easier to edit the file contents than to edit the patch
   format.

 * It delegates the hard work to a tool that is already written (this
   is a big advantage for an immature tool like Jujube, but it is not
   an advantage from the user's point of view).

Almost all of the work in this commit went into adding a function that
takes two trees, lets the user edit the diff, and returns a new tree
id. I plan to reuse that function for other interactive commands. One
planned command is `jj edit`, which will let the user edit the changes
in a commit. `jj edit -r abc123` will be mostly about providing a more
intuitive name for `jj restore --source abc123^ --destination abc123`,
plus it will be different for merge commits (it will edit only the
changes in the merge commit). I also plan to add `jj split` by letting
the user edit the full diff, leaving only the parts that should go
into the first commit. Perhaps there will also be commands for moving
part of a commit out of or into a parent commit.
2020-12-26 01:16:19 -08:00
Martin von Zweigbergk
6b1427cb46 import commit 0f15be02bf4012c116636913562691a0aaa7aed2 from my hg repo 2020-12-12 00:23:38 -08:00