jj/lib/src
Martin von Zweigbergk 2172887876 git: don't detach head if the ref already points to the right place
The first time we export to Git, we don't actually export
anything. That's a little weird and I don't know why I did it that
way. It seems more natural to export the current state. I'd like to
change it to do that. However, that currently means we'll detach the
current HEAD if it points to any of the branches we export. This patch
restructures the code a bit and skips the detach step if the target
branch already points to the right commit.
2022-11-13 15:06:10 -08:00
..
protos backend: remove Commit::is_open field from data model 2022-11-05 06:14:37 -07:00
backend.rs local_backend: use ContentHash rather than hashing protos 2022-11-12 21:40:36 -08:00
commit.rs backend: remove Commit::is_open field from data model 2022-11-05 06:14:37 -07:00
commit_builder.rs commit_builder: remove redundant for_open_commit() 2022-11-05 06:14:37 -07:00
conflicts.rs conflicts: simplify state management of parse_conflict_hunk() 2022-09-21 06:03:59 +09:00
content_hash.rs local_backend: use ContentHash rather than hashing protos 2022-11-12 21:40:36 -08:00
dag_walk.rs cleanup: remove extern crate declarations 2022-09-21 22:24:09 -07:00
diff.rs diff: add helpers for finding index for non-base side 2022-03-10 22:00:45 -08:00
file_util.rs tests: move testutils module into separate crate 2022-11-08 07:29:35 -08:00
files.rs cleanup: remove workaround for fixed split_inclusive() bug 2022-07-10 11:09:01 -07:00
git.rs git: don't detach head if the ref already points to the right place 2022-11-13 15:06:10 -08:00
git_backend.rs tests: move testutils module into separate crate 2022-11-08 07:29:35 -08:00
gitignore.rs gitignore: move function for chaining .gitignore to central place (#65, #87) 2022-03-12 10:48:06 -08:00
index.rs tests: move testutils module into separate crate 2022-11-08 07:29:35 -08:00
index_store.rs Fixes suggested by new version of Clippy 2022-11-03 21:38:16 -07:00
lib.rs simple_op_store: replace Protobuf by Thrift 2022-11-13 11:39:33 -08:00
local_backend.rs local_backend: use ContentHash rather than hashing protos 2022-11-12 21:40:36 -08:00
lock.rs tests: move testutils module into separate crate 2022-11-08 07:29:35 -08:00
matchers.rs cleanup: remove extern crate declarations 2022-09-21 22:24:09 -07:00
nightly_shims.rs build: suppress unstable_name_collisions warnings on stable 2022-02-23 23:41:55 -08:00
op_heads_store.rs op_heads_store: don't pass whole RepoLoader into get_heads() 2022-04-21 21:55:19 -07:00
op_store.rs simple_op_store: hash view/operation data directly 2022-11-12 21:40:36 -08:00
operation.rs store: rename Store to Backend and StoreWrapper to Store 2021-09-12 12:02:10 -07:00
proto_op_store.rs simple_op_store: replace Protobuf by Thrift 2022-11-13 11:39:33 -08:00
refs.rs store: rename Store to Backend and StoreWrapper to Store 2021-09-12 12:02:10 -07:00
repo.rs repo: simplify unsafe cast of view reference 2022-11-12 01:03:48 +09:00
repo_path.rs local_backend: use ContentHash rather than hashing protos 2022-11-12 21:40:36 -08:00
revset.pest revset: fix parsing of concatenated-identifier in expression 2022-10-06 21:56:41 +09:00
revset.rs revset: add present(set) predicate that suppresses NoSuchRevision error 2022-11-07 21:41:54 +09:00
revset_graph_iterator.rs revset_graph_iterator: add a mode for generating reverse graph 2022-05-15 05:17:54 -07:00
rewrite.rs commit_builder: remove redundant for_open_commit() 2022-11-05 06:14:37 -07:00
settings.rs Add --config-toml command-line argument for additional TOML config 2022-11-05 21:21:33 -07:00
simple_op_store.rs git: write view object - not operation ID - to disk on export 2022-11-13 15:06:10 -08:00
simple_op_store_model.rs simple_op_store: replace Protobuf by Thrift 2022-11-13 11:39:33 -08:00
simple_op_store_model.thrift simple_op_store: replace Protobuf by Thrift 2022-11-13 11:39:33 -08:00
stacked_table.rs tests: move testutils module into separate crate 2022-11-08 07:29:35 -08:00
store.rs backend: let each backend handle root commit on write 2022-09-20 21:20:57 -07:00
transaction.rs cli: don't keep Repo references from before transaction start 2022-07-06 07:21:57 -07:00
tree.rs errors: use custom error for failed tree merge 2022-05-03 06:52:00 -07:00
tree_builder.rs working_copy: on finish(), don't serialize tree_state if known to be clean 2022-10-02 15:15:18 +09:00
view.rs cli: add git remote rename subcommand 2022-10-20 11:04:16 -07:00
working_copy.rs cleanup: automated fixes by new Clippy version 2022-10-09 12:20:15 -07:00
workspace.rs git: don't abandon HEAD commit when it loses a branch 2022-10-29 03:02:26 -07:00