jj/tests
Martin von Zweigbergk 034fbb47e3 cli: fix crash when initializing workspace colocated with Git repo
When initializing a workspace that shares its working copy with a Git
repo (i.e. `jj init --git-repo=.`), we import refs and HEAD when
creating the `WorkspaceCommandHelper` (as we do for all commands when
the working copy is shared). That makes the explicit import we do in
`cmd_init()` unnecessary. It also makes the checkout of HEAD I added
for the fix of #102 unnecessary. More importantly, as @yuja reported
in #177, it makes the command crash (at least if the repo is small
enough that the two checkouts happen within a second). I think the
problem is that the second checkout tries to create the same commit
except that the Change ID is different (the problem is not the
predecessors as I speculated in the issue tracker). The fix is to
simply avoid doing the redundant work. We still need a proper fix for
#27 eventually.

Closes #177.
2022-03-30 22:09:55 -07:00
..
smoke_test.rs
test_concurrent_operations.rs cli: display how many commits were rebased when merging operations (#111) 2022-03-26 22:31:49 -07:00
test_git_colocated.rs cli: fix crash when initializing workspace colocated with Git repo 2022-03-30 22:09:55 -07:00
test_git_push.rs
test_gitignores.rs
test_global_opts.rs tests: add test for invalid config (#55) 2022-03-27 21:11:55 -07:00
test_init_command.rs cli: fix crash when initializing workspace colocated with Git repo 2022-03-30 22:09:55 -07:00
test_log_command.rs log: add -p/--patch option to show diff along with commit meta data 2022-03-30 16:24:34 -07:00
test_new.rs
test_ui.rs
test_undo.rs repo: when merging in removed head, rebase descendants (#111) 2022-03-26 22:31:49 -07:00
test_untrack_command.rs