diff --git a/README.md b/README.md
index 01bf6a793..dbe317918 100644
--- a/README.md
+++ b/README.md
@@ -227,7 +227,7 @@ Here is how you can explore a GitHub repository with `jj`.
You can even have a [colocated local
-repository](https://jj-vcs.github.io/jj/latest/git-compatibility#colocated-jujutsugit-repos)
+workspace](https://jj-vcs.github.io/jj/latest/git-compatibility#colocated-jujutsugit-repos)
where you can use both `jj` and `git` commands interchangeably.
### The working copy is automatically committed
diff --git a/cli/build.rs b/cli/build.rs
index 5ae71b33b..ff60bd705 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -24,7 +24,7 @@ fn main() {
println!("cargo:rerun-if-env-changed=NIX_JJ_GIT_HASH");
let git_hash = get_git_hash_from_nix().or_else(|| {
if Path::new(GIT_HEAD_PATH).exists() {
- // In colocated repo, .git/HEAD should reflect the working-copy parent.
+ // In colocated workspace, .git/HEAD should reflect the working-copy parent.
println!("cargo:rerun-if-changed={GIT_HEAD_PATH}");
} else if Path::new(JJ_OP_HEADS_PATH).exists() {
// op_heads changes when working-copy files are mutated, which is way more
diff --git a/cli/src/commands/file/untrack.rs b/cli/src/commands/file/untrack.rs
index c8cadc509..d308ad1af 100644
--- a/cli/src/commands/file/untrack.rs
+++ b/cli/src/commands/file/untrack.rs
@@ -36,7 +36,7 @@ pub(crate) struct FileUntrackArgs {
/// Paths to untrack. They must already be ignored.
///
/// The paths could be ignored via a .gitignore or .git/info/exclude (in
- /// colocated repos).
+ /// colocated workspaces).
#[arg(
required = true,
value_name = "FILESETS",
diff --git a/cli/src/commands/git/clone.rs b/cli/src/commands/git/clone.rs
index b4667f57f..136882dd8 100644
--- a/cli/src/commands/git/clone.rs
+++ b/cli/src/commands/git/clone.rs
@@ -81,7 +81,8 @@ pub struct GitCloneArgs {
/// operating on the repo. The Git repository that stores most of the repo
/// data will be hidden inside a sub-directory of the `.jj` directory.
///
- /// See [colocation docs] for some minor advantages of non-colocated repos.
+ /// See [colocation docs] for some minor advantages of non-colocated
+ /// workspaces.
///
/// [colocation docs]:
/// https://jj-vcs.github.io/jj/latest/git-compatibility/#colocated-jujutsugit-repos
diff --git a/cli/src/commands/git/colocation.rs b/cli/src/commands/git/colocation.rs
index 0da789bbb..49a947962 100644
--- a/cli/src/commands/git/colocation.rs
+++ b/cli/src/commands/git/colocation.rs
@@ -72,7 +72,7 @@ pub fn cmd_git_colocation(
/// Check that the repository supports colocation commands
/// which means that the repo is backed by git, is not
/// already colocated, and is a main workspace
-fn repo_supports_git_colocation_commands(
+fn workspace_supports_git_colocation_commands(
workspace_command: &crate::cli_util::WorkspaceCommandHelper,
) -> Result<(), CommandError> {
// Check if backend is Git (will show an error otherwise)
@@ -95,14 +95,14 @@ fn cmd_git_colocation_status(
) -> Result<(), CommandError> {
let workspace_command = command.workspace_helper(ui)?;
- // Make sure that the repository supports git colocation commands
- repo_supports_git_colocation_commands(&workspace_command)?;
+ // Make sure that the workspace supports git colocation commands
+ workspace_supports_git_colocation_commands(&workspace_command)?;
let is_colocated =
is_colocated_git_workspace(workspace_command.workspace(), workspace_command.repo());
if is_colocated {
- writeln!(ui.stdout(), "Repository is currently colocated with Git.")?;
+ writeln!(ui.stdout(), "Workspace is currently colocated with Git.")?;
writeln!(
ui.hint_default(),
"To disable colocation, run: `jj git colocation disable`"
@@ -110,7 +110,7 @@ fn cmd_git_colocation_status(
} else {
writeln!(
ui.stdout(),
- "Repository is currently not colocated with Git."
+ "Workspace is currently not colocated with Git."
)?;
writeln!(
ui.hint_default(),
@@ -128,12 +128,12 @@ fn cmd_git_colocation_enable(
) -> Result<(), CommandError> {
let workspace_command = command.workspace_helper(ui)?;
- // Make sure that the repository supports git colocation commands
- repo_supports_git_colocation_commands(&workspace_command)?;
+ // Make sure that the workspace supports git colocation commands
+ workspace_supports_git_colocation_commands(&workspace_command)?;
- // Then ensure that the repo is not already colocated before proceeding
+ // Then ensure that the workspace is not already colocated before proceeding
if is_colocated_git_workspace(workspace_command.workspace(), workspace_command.repo()) {
- writeln!(ui.status(), "Repository is already colocated with Git.")?;
+ writeln!(ui.status(), "Workspace is already colocated with Git.")?;
return Ok(());
}
@@ -156,7 +156,7 @@ fn cmd_git_colocation_enable(
user_error("A .git directory already exists in the workspace root. Cannot colocate.")
}
_ => user_error_with_message(
- "Failed to move Git repository from .jj/repo/store/git to repository root directory.",
+ "Failed to move Git repository from .jj/repo/store/git to workspace root directory.",
err,
),
})?;
@@ -181,7 +181,7 @@ fn cmd_git_colocation_enable(
writeln!(
ui.status(),
- "Repository successfully converted into a colocated Jujutsu/Git repository."
+ "Workspace successfully converted into a colocated Jujutsu/Git workspace."
)?;
Ok(())
@@ -195,11 +195,11 @@ fn cmd_git_colocation_disable(
let workspace_command = command.workspace_helper(ui)?;
// Make sure that the repository supports git colocation commands
- repo_supports_git_colocation_commands(&workspace_command)?;
+ workspace_supports_git_colocation_commands(&workspace_command)?;
// Then ensure that the repo is colocated before proceeding
if !is_colocated_git_workspace(workspace_command.workspace(), workspace_command.repo()) {
- writeln!(ui.status(), "Repository is already not colocated with Git.")?;
+ writeln!(ui.status(), "Workspace is already not colocated with Git.")?;
return Ok(());
}
@@ -236,7 +236,7 @@ fn cmd_git_colocation_disable(
writeln!(
ui.status(),
- "Repository successfully converted into a non-colocated Jujutsu/Git repository."
+ "Workspace successfully converted into a non-colocated Jujutsu/Git workspace."
)?;
Ok(())
diff --git a/cli/src/commands/git/export.rs b/cli/src/commands/git/export.rs
index 0698aed5b..c075fe95f 100644
--- a/cli/src/commands/git/export.rs
+++ b/cli/src/commands/git/export.rs
@@ -21,8 +21,8 @@ use crate::ui::Ui;
/// Update the underlying Git repo with changes made in the repo
///
-/// There is no need to run this command if you're in colocated repo because the
-/// export happens automatically there.
+/// There is no need to run this command if you're in colocated workspace
+/// because the export happens automatically there.
#[derive(clap::Args, Clone, Debug)]
pub struct GitExportArgs {}
diff --git a/cli/src/commands/git/import.rs b/cli/src/commands/git/import.rs
index faae33e88..bb1275607 100644
--- a/cli/src/commands/git/import.rs
+++ b/cli/src/commands/git/import.rs
@@ -24,8 +24,8 @@ use crate::ui::Ui;
/// If a working-copy commit gets abandoned, it will be given a new, empty
/// commit. This is true in general; it is not specific to this command.
///
-/// There is no need to run this command if you're in colocated repo because the
-/// import happens automatically there.
+/// There is no need to run this command if you're in colocated workspace
+/// because the import happens automatically there.
#[derive(clap::Args, Clone, Debug)]
pub struct GitImportArgs {}
@@ -37,7 +37,7 @@ pub fn cmd_git_import(
let mut workspace_command = command.workspace_helper(ui)?;
let git_settings = workspace_command.settings().git_settings()?;
let mut tx = workspace_command.start_transaction();
- // In non-colocated repo, Git HEAD will never be moved internally by jj.
+ // In non-colocated workspace, Git HEAD will never be moved internally by jj.
// That's why cmd_git_export() doesn't export the HEAD ref.
git::import_head(tx.repo_mut())?;
let stats = git::import_refs(tx.repo_mut(), &git_settings)?;
diff --git a/cli/src/commands/git/init.rs b/cli/src/commands/git/init.rs
index 9b002e13d..7603b9bdc 100644
--- a/cli/src/commands/git/init.rs
+++ b/cli/src/commands/git/init.rs
@@ -80,7 +80,8 @@ pub struct GitInitArgs {
/// operating on the repo. The Git repository that stores most of the repo
/// data will be hidden inside a sub-directory of the `.jj` directory.
///
- /// See [colocation docs] for some minor advantages of non-colocated repos.
+ /// See [colocation docs] for some minor advantages of non-colocated
+ /// workspaces.
///
/// [colocation docs]:
/// https://jj-vcs.github.io/jj/latest/git-compatibility/#colocated-jujutsugit-repos
@@ -93,7 +94,7 @@ pub struct GitInitArgs {
/// If the specified `--git-repo` path happens to be the same as
/// the `jj` repo path (both .jj and .git directories are in the
/// same working directory), then both `jj` and `git` commands
- /// will work on the same repo. This is called a colocated repo.
+ /// will work on the same repo. This is called a colocated workspace.
///
/// This option is mutually exclusive with `--colocate`.
#[arg(long, conflicts_with = "colocate", value_hint = clap::ValueHint::DirPath)]
diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap
index e4e760bba..e4a3a7d67 100644
--- a/cli/tests/cli-reference@.md.snap
+++ b/cli/tests/cli-reference@.md.snap
@@ -1156,7 +1156,7 @@ Stop tracking specified paths in the working copy
* `` — Paths to untrack. They must already be ignored.
- The paths could be ignored via a .gitignore or .git/info/exclude (in colocated repos).
+ The paths could be ignored via a .gitignore or .git/info/exclude (in colocated workspaces).
@@ -1331,7 +1331,7 @@ Create a new repo backed by a clone of a Git repo
Prevent Git tools that are unaware of `jj` and regular Git commands from operating on the repo. The Git repository that stores most of the repo data will be hidden inside a sub-directory of the `.jj` directory.
- See [colocation docs] for some minor advantages of non-colocated repos.
+ See [colocation docs] for some minor advantages of non-colocated workspaces.
[colocation docs]: https://jj-vcs.github.io/jj/latest/git-compatibility/#colocated-jujutsugit-repos
* `--depth ` — Create a shallow clone of the given depth
@@ -1401,7 +1401,7 @@ Show the current colocation status
Update the underlying Git repo with changes made in the repo
-There is no need to run this command if you're in colocated repo because the export happens automatically there.
+There is no need to run this command if you're in colocated workspace because the export happens automatically there.
**Usage:** `jj git export`
@@ -1440,7 +1440,7 @@ Update repo with changes made in the underlying Git repo
If a working-copy commit gets abandoned, it will be given a new, empty commit. This is true in general; it is not specific to this command.
-There is no need to run this command if you're in colocated repo because the import happens automatically there.
+There is no need to run this command if you're in colocated workspace because the import happens automatically there.
**Usage:** `jj git import`
@@ -1477,12 +1477,12 @@ Create a new Git backed repo
Prevent Git tools that are unaware of `jj` and regular Git commands from operating on the repo. The Git repository that stores most of the repo data will be hidden inside a sub-directory of the `.jj` directory.
- See [colocation docs] for some minor advantages of non-colocated repos.
+ See [colocation docs] for some minor advantages of non-colocated workspaces.
[colocation docs]: https://jj-vcs.github.io/jj/latest/git-compatibility/#colocated-jujutsugit-repos
* `--git-repo ` — Specifies a path to an **existing** git repository to be used as the backing git repo for the newly created `jj` repo.
- If the specified `--git-repo` path happens to be the same as the `jj` repo path (both .jj and .git directories are in the same working directory), then both `jj` and `git` commands will work on the same repo. This is called a colocated repo.
+ If the specified `--git-repo` path happens to be the same as the `jj` repo path (both .jj and .git directories are in the same working directory), then both `jj` and `git` commands will work on the same repo. This is called a colocated workspace.
This option is mutually exclusive with `--colocate`.
diff --git a/cli/tests/common/test_environment.rs b/cli/tests/common/test_environment.rs
index 040913c94..23c555f2b 100644
--- a/cli/tests/common/test_environment.rs
+++ b/cli/tests/common/test_environment.rs
@@ -63,7 +63,7 @@ impl Default for TestEnvironment {
command_number: RefCell::new(0),
};
// Use absolute timestamps in the operation log to make tests independent of the
- // current time. Use non-colocated repos by default for simplicity.
+ // current time. Use non-colocated workspaces by default for simplicity.
env.add_config(
r#"
[template-aliases]
diff --git a/cli/tests/test_bookmark_command.rs b/cli/tests/test_bookmark_command.rs
index 4f1a692a7..4b9b6032a 100644
--- a/cli/tests/test_bookmark_command.rs
+++ b/cli/tests/test_bookmark_command.rs
@@ -910,9 +910,9 @@ fn test_bookmark_forget_export() {
[exit status: 1]
");
- // `jj git export` will delete the bookmark from git. In a colocated repo,
- // this will happen automatically immediately after a `jj bookmark forget`.
- // This is demonstrated in `test_git_colocated_bookmark_forget` in
+ // `jj git export` will delete the bookmark from git. In a colocated
+ // workspace, this will happen automatically immediately after a `jj bookmark
+ // forget`. This is demonstrated in `test_git_colocated_bookmark_forget` in
// test_git_colocated.rs
let output = work_dir.run_jj(["git", "export"]);
insta::assert_snapshot!(output, @"");
@@ -965,7 +965,7 @@ fn test_bookmark_forget_fetched_bookmark() {
insta::assert_snapshot!(get_bookmark_output(&work_dir), @"");
// At this point `jj git export && jj git import` does *not* recreate the
- // bookmark. This behavior is important in colocated repos, as otherwise a
+ // bookmark. This behavior is important in colocated workspaces, as otherwise a
// forgotten bookmark would be immediately resurrected.
//
// Technically, this is because `jj bookmark forget` preserved
diff --git a/cli/tests/test_git_colocation.rs b/cli/tests/test_git_colocation.rs
index b2d7a7bb3..09065e03c 100644
--- a/cli/tests/test_git_colocation.rs
+++ b/cli/tests/test_git_colocation.rs
@@ -24,7 +24,7 @@ fn read_git_target(workspace_root: &std::path::Path) -> String {
fn test_git_colocation_enable_success() {
let test_env = TestEnvironment::default();
- // Initialize a non-colocated Jujutsu/Git repo
+ // Initialize a non-colocated Jujutsu/Git workspace
test_env
.run_jj_in(
test_env.env_root(),
@@ -55,8 +55,9 @@ fn test_git_colocation_enable_success() {
let output = work_dir.run_jj(["git", "colocation", "enable"]);
insta::assert_snapshot!(output, @r"
------- stderr -------
- Repository successfully converted into a colocated Jujutsu/Git repository.
- [EOF]");
+ Workspace successfully converted into a colocated Jujutsu/Git workspace.
+ [EOF]
+ ");
// Verify colocate succeeded
assert!(workspace_root.join(".git").exists());
@@ -100,8 +101,9 @@ fn test_git_colocation_enable_already_colocated() {
let output = work_dir.run_jj(["git", "colocation", "enable"]);
insta::assert_snapshot!(output, @r"
------- stderr -------
- Repository is already colocated with Git.
- [EOF]");
+ Workspace is already colocated with Git.
+ [EOF]
+ ");
}
#[test]
@@ -163,8 +165,9 @@ fn test_git_colocation_disable_success() {
let output = work_dir.run_jj(["git", "colocation", "disable"]);
insta::assert_snapshot!(output, @r"
------- stderr -------
- Repository successfully converted into a non-colocated Jujutsu/Git repository.
- [EOF]");
+ Workspace successfully converted into a non-colocated Jujutsu/Git workspace.
+ [EOF]
+ ");
// Verify that disable colocation succeeded
assert!(!workspace_root.join(".git").exists());
@@ -207,8 +210,9 @@ fn test_git_colocation_disable_not_colocated() {
let output = work_dir.run_jj(["git", "colocation", "disable"]);
insta::assert_snapshot!(output, @r"
------- stderr -------
- Repository is already not colocated with Git.
- [EOF]");
+ Workspace is already not colocated with Git.
+ [EOF]
+ ");
}
#[test]
@@ -227,11 +231,12 @@ fn test_git_colocation_status_non_colocated() {
// Check status - should show non-colocated
let output = work_dir.run_jj(["git", "colocation", "status"]);
insta::assert_snapshot!(output, @r"
- Repository is currently not colocated with Git.
+ Workspace is currently not colocated with Git.
[EOF]
------- stderr -------
Hint: To enable colocation, run: `jj git colocation enable`
- [EOF]");
+ [EOF]
+ ");
}
#[test]
@@ -247,11 +252,12 @@ fn test_git_colocation_status_colocated() {
// Check status - should show colocated
let output = work_dir.run_jj(["git", "colocation", "status"]);
insta::assert_snapshot!(output, @r"
- Repository is currently colocated with Git.
+ Workspace is currently colocated with Git.
[EOF]
------- stderr -------
Hint: To disable colocation, run: `jj git colocation disable`
- [EOF]");
+ [EOF]
+ ");
}
#[test]
diff --git a/cli/tests/test_git_fetch.rs b/cli/tests/test_git_fetch.rs
index 23490ef42..b53112052 100644
--- a/cli/tests/test_git_fetch.rs
+++ b/cli/tests/test_git_fetch.rs
@@ -505,8 +505,8 @@ fn test_git_fetch_from_remote_named_git() {
");
// Explicit import also works. Warnings are printed twice because this is a
- // colocated repo. That should be fine since "jj git import" wouldn't be
- // used in colocated environment.
+ // colocated workspace. That should be fine since "jj git import" wouldn't
+ // be used in colocated environment.
insta::assert_snapshot!(work_dir.run_jj(["git", "import"]), @r"
------- stderr -------
Warning: Failed to import some Git refs:
@@ -669,7 +669,7 @@ fn test_git_fetch_conflicting_bookmarks_colocated() {
// Helper functions to test obtaining multiple bookmarks at once and changed
// bookmarks
fn create_colocated_repo_and_bookmarks_from_trunk1(work_dir: &TestWorkDir) -> String {
- // Create a colocated repo in `source` to populate it more easily
+ // Create a colocated workspace in `source` to populate it more easily
work_dir
.run_jj(["git", "init", "--git-repo", "."])
.success();
diff --git a/cli/tests/test_git_init.rs b/cli/tests/test_git_init.rs
index ca55e24f8..1063db9c8 100644
--- a/cli/tests/test_git_init.rs
+++ b/cli/tests/test_git_init.rs
@@ -833,7 +833,7 @@ fn test_git_init_external_but_git_dir_exists() {
[EOF]
");
- // Check that Git HEAD is not set because this isn't a colocated repo
+ // Check that Git HEAD is not set because this isn't a colocated workspace
work_dir.run_jj(["new"]).success();
insta::assert_snapshot!(get_log_output(&work_dir), @r"
@ 1c1c95df80e5
diff --git a/docs/FAQ.md b/docs/FAQ.md
index 0dbc6c0fe..1161797b3 100644
--- a/docs/FAQ.md
+++ b/docs/FAQ.md
@@ -618,7 +618,7 @@ revsets. This seemed unlikely to be accepted by the Git project.
[change]: glossary.md#change
[change ID]: glossary.md#change-id
-[colocated]: glossary.md#colocated-repos
+[colocated]: glossary.md#colocated-workspaces
[commit ID]: glossary.md#commit-id
[commits]: glossary.md#commit
[config]: config.md
diff --git a/docs/bookmarks.md b/docs/bookmarks.md
index 7e5fd846b..20911c6df 100644
--- a/docs/bookmarks.md
+++ b/docs/bookmarks.md
@@ -19,7 +19,7 @@ example, `jj git push --bookmark foo` will push the state of the `foo` bookmark
to the `foo` branch on the Git remote. Similarly, if you create a `bar` branch
in the backing Git repo, then a subsequent `jj git import` will create a `bar`
bookmark (reminder: that import happens automatically in
-[colocated repos][colocated-repos]).
+[colocated workspaces][colocated-workspaces]).
## Remotes and tracked bookmarks
@@ -232,5 +232,5 @@ command itself through an alias (as `jj b`), and for its subcommands.
For example, `jj bookmark create BOOKMARK-NAME -r@` can be abbreviated as
`jj b c BOOKMARK-NAME -r@`.
-[colocated-repos]: git-compatibility.md#colocated-jujutsugit-repos
+[colocated-workspaces]: git-compatibility.md#colocated-jujutsugit-repos
[design]: design/tracking-branches.md
diff --git a/docs/config.md b/docs/config.md
index b0bb0abcd..e15d60876 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -1462,10 +1462,11 @@ Colocation allows some amount of two-way interoperability, but it can perform
worse in large repos.
The setting `git.colocate` is a boolean option that controls whether or not the
-`jj git init` and `jj git clone` commands should create colocated working copies
-by default. Set `git.colocate` to `false` to disable it.
+`jj git init` and `jj git clone` commands should create colocated workspace by
+default. Set `git.colocate` to `false` to disable it.
-See [Colocated Jujutsu/Git repos](git-compatibility.md#colocated-jujutsugit-repos) for more information.
+See [Colocated Jujutsu/Git workspaces](git-compatibility.md#colocated-jujutsugit-repos)
+for more information.
### Default remotes for `jj git fetch` and `jj git push`
@@ -1509,7 +1510,7 @@ local bookmark with the same name. This feature is disabled by default because i
may be undesirable in some repositories, e.g.:
- There is a remote with a lot of historical bookmarks that you don't
- want to be exported to the colocated Git repo.
+ want to be exported to the colocated Git workspace.
- There are multiple remotes with conflicting views of that bookmark,
resulting in an unhelpful conflicted state.
diff --git a/docs/design/git-submodule-storage.md b/docs/design/git-submodule-storage.md
index c3dcf686e..7d916c4e0 100644
--- a/docs/design/git-submodule-storage.md
+++ b/docs/design/git-submodule-storage.md
@@ -56,7 +56,7 @@ but a full proposal for implementing them is not necessary.
These extensions are:
- Non-git subrepos
-- Colocated Git repos
+- Colocated Git workspace
- The superproject using a non-git backend
## Proposed design
@@ -106,12 +106,12 @@ is unlikely to complicate any of the core features, since the top-level
superproject/submodule relationship is almost identical to the submodule/nested
submodule relationship.
-### Extending to colocated Git repos
+### Extending to colocated Git workspaces
Git expects submodules to be in `.git/modules`, so it will not understand this
-storage format. To support colocated Git repos, we will have to change Git to
-allow a submodule's gitdir to be in an alternate location (e.g. we could add a
-new `submodule..gitdir` config option). This is a simple change, so it
+storage format. To support colocated Git workspaces, we will have to change Git
+to allow a submodule's gitdir to be in an alternate location (e.g. we could add
+a new `submodule..gitdir` config option). This is a simple change, so it
should be feasible.
## Alternatives considered
diff --git a/docs/design/git-submodules.md b/docs/design/git-submodules.md
index 1f5b1276f..8bec9d723 100644
--- a/docs/design/git-submodules.md
+++ b/docs/design/git-submodules.md
@@ -72,8 +72,8 @@ of workflows, with the goal of getting feedback early and often. When support is
incomplete, jj should not crash, but instead provide fallback behavior and warn
the user where needed.
-The goal is to land good support for pure Jujutsu repositories, while colocated
-repositories will be supported when convenient.
+The goal is to land good support for pure Jujutsu workspaces, while colocated
+workspaces will be supported when convenient.
This section should be treated as a set of guidelines, not a strict order of
work.
diff --git a/docs/design/tracking-branches.md b/docs/design/tracking-branches.md
index 7ea0dad3b..e67a67ec7 100644
--- a/docs/design/tracking-branches.md
+++ b/docs/design/tracking-branches.md
@@ -39,7 +39,7 @@ git_head: target?
`git_refs["refs/remotes"]`. These two are mostly kept in sync, but there
are two scenarios where remote-tracking branches and git refs can diverge:
1. `jj branch forget`
- 2. `jj op revert`/`restore` in colocated repo
+ 2. `jj op revert`/`restore` in colocated workspace
* Pseudo `@git` tracking branches are stored in `git_refs["refs/heads"]`. We
need special case to resolve `@git` branches, and their behavior is slightly
different from the other remote-tracking branches.
diff --git a/docs/git-compatibility.md b/docs/git-compatibility.md
index 251132d9b..6759a5aec 100644
--- a/docs/git-compatibility.md
+++ b/docs/git-compatibility.md
@@ -77,8 +77,8 @@ a comparison with Git, including how workflows are different, see the
## Creating an empty repo
To create an empty repo using the Git backend, use `jj git init `. This
-creates a [colocated](#co-located-jujutsugit-repos) Jujutsu repo, there will be
-a `.jj` directory and a `.git` directory.
+creates a [colocated](#colocated-jujutsugit-workspaces) Jujutsu workspace,
+there will be a `.jj` directory and a `.git` directory.
## Creating a repo backed by an existing Git repo
@@ -100,20 +100,21 @@ into a directory by the same name.
By default, the remote repository will be named `origin`. You can use a name of
your choice by adding `--remote ` to the `jj git clone` command.
-## Colocated Jujutsu/Git repos
+## Colocated Jujutsu/Git workspaces
-A colocated Jujutsu repo is a hybrid Jujutsu/Git repo. This is the default for
-Git-backed repositories created with `jj git init` or `jj git clone`. The Git
-repo and the Jujutsu repo then share the same working copy. Jujutsu will import
-and export from and to the Git repo on every `jj` command automatically.
+A colocated Jujutsu workspace is a hybrid Jujutsu/Git workspace. This is the
+default for Git-backed workspace created with `jj git init` or `jj git clone`.
+The Git repo and the Jujutsu workspace then share the same working copy. Jujutsu
+will import and export from and to the Git repo on every `jj` command
+automatically.
This mode is very convenient when tools (e.g. build tools) expect a Git repo to
be present.
-It is allowed to mix `jj` and `git` commands in such a repo in any order.
+It is allowed to mix `jj` and `git` commands in such a workspace in any order.
However, it may be easier to keep track of what is going on if you mostly use
read-only `git` commands and use `jj` to make changes to the repo. One reason
-for this (see below for more) is that `jj` commands will usually put the git
+for this (see below for more) is that `jj` commands will usually put the Git
repo in a "detached HEAD" state, since in `jj` there is not concept of a
"currently tracked branch". Before doing mutating Git commands, you may need to
tell Git what the current branch should be with a `git switch` command.
@@ -141,10 +142,11 @@ Colocation can be disabled because it does have some disadvantages:
it because they automatically run `git fetch` in the background from time to
time.
-* In colocated repos with a very large number of branches or other refs, `jj`
- commands can get noticeably slower because of the automatic `jj git import`
- executed on each command. This can be mitigated by occasionally running `jj
- util gc` to speed up the import (that command includes packing the Git refs).
+* In colocated workspaces with a very large number of branches or other refs,
+ `jj` commands can get noticeably slower because of the automatic
+ `jj git import` executed on each command. This can be mitigated by
+ occasionally running `jj util gc` to speed up the import (that command
+ includes packing the Git refs).
* Git tools will have trouble with revisions that contain conflicted files.
While `jj` renders these files with conflict markers in the working copy, they
@@ -160,7 +162,7 @@ Colocation can be disabled because it does have some disadvantages:
as Git represents them, unfinished `git rebase` states, as well as other less
common states a Git repository can be in.
-* Colocated repositories are less resilient to
+* Colocated workspaces are less resilient to
[concurrency](technical/concurrency.md#syncing-with-rsync-nfs-dropbox-etc)
issues if you share the repo using an NFS filesystem or Dropbox. In general,
such use of Jujutsu is not currently thoroughly tested.
@@ -171,24 +173,25 @@ Colocation can be disabled because it does have some disadvantages:
report any new ones you find, or if any of the known bugs are less minor than
they appear.
-### Converting a repo into a colocated repo
+### Converting a workspace into a colocated workspace
-A Jujutsu repo backed by a Git repo has a full Git repo inside, which can be
-converted into a colocated repo using the `jj git colocation` command.
+A Jujutsu workspace backed by a Git repo has a full Git repo inside. Such a
+workspace can be converted into a colocated workspace using the
+`jj git colocation` command.
-To check the current colocation status of your repository:
+To check the current colocation status of your workspace:
```bash
jj git colocation status
```
-To convert to a colocated repo:
+To convert to a colocated workspace:
```bash
jj git colocation enable
```
-To convert to a non-colocated repo:
+To convert to a non-colocated workspace:
```bash
jj git colocation disable
diff --git a/docs/github.md b/docs/github.md
index 2ee968e8f..d07b82948 100644
--- a/docs/github.md
+++ b/docs/github.md
@@ -57,14 +57,14 @@ changes.
[sync-issue]: https://github.com/jj-vcs/jj/issues/1039
-## Working in a Git colocated repository
+## Working in a Git colocated workspaces
After doing `jj git init`, which
[colocates](git-compatibility.md#colocated-jujutsugit-repos) the `.jj` and
`.git` directories, Git will be in a [detached HEAD state][detached], which is
unusual, as Git mainly works with named branches; jj does not.
-In a colocated repository, every `jj` command will automatically synchronize
+In a colocated workspace, every `jj` command will automatically synchronize
Jujutsu's view of the repo with Git's view. For example, `jj commit` updates the
HEAD of the Git repository, enabling an incremental migration.
@@ -191,7 +191,7 @@ export GIT_DIR=$PWD/.jj/repo/store/git
```
and run `direnv allow` to approve it for direnv to run. Then GitHub CLI will
-work automatically even in repos that aren't colocated so you can execute
+work automatically even in workspaces that aren't colocated so you can execute
commands like `gh issue list` normally.
[issue #1008]: https://github.com/jj-vcs/jj/issues/1008
diff --git a/docs/glossary.md b/docs/glossary.md
index 4adbd08b4..fa908aa5f 100644
--- a/docs/glossary.md
+++ b/docs/glossary.md
@@ -38,7 +38,7 @@ branch](#anonymous-branch) or, less formally, a branch of the commit "tree"
might resemble a tree even when it's not mathematically a tree).
We also sometimes discuss Git's branches and branches on Git remotes. Locally,
-these correspond to [bookmarks](#bookmark). In a colocated repository, each
+these correspond to [bookmarks](#bookmark). In a colocated workspace, each
local Git branch corresponds to a `jj` bookmark.
## Change
@@ -79,11 +79,11 @@ long when using the Git backend. They are presented in regular hexadecimal
format at the end of the line in `jj log`, using 12 hexadecimal digits by
default. When using the Git backend, the commit ID is the Git commit ID.
-## Colocated repos
+## Colocated workspaces
When using the Git [backend](#backend) and the backing Git repository's `.git/`
-directory is a sibling of `.jj/`, we call the repository colocated. Most
-tools designed for Git can be easily used on such repositories. `jj` and `git`
+directory is a sibling of `.jj/`, we call the workspace colocated. Most
+tools designed for Git can be easily used on such workspace. `jj` and `git`
commands can be used interchangeably.
See [here](git-compatibility.md#colocated-jujutsugit-repos) for details.
diff --git a/docs/technical/concurrency.md b/docs/technical/concurrency.md
index 901365d6e..12198f954 100644
--- a/docs/technical/concurrency.md
+++ b/docs/technical/concurrency.md
@@ -55,7 +55,7 @@ about the bug, it is relatively easy to recover from.
Moreover, such use of Jujutsu is not currently thoroughly tested,
especially in the context of [colocated
-repositories](../glossary.md#colocated-repos). While the contents of commits
+repositories](../glossary.md#colocated-workspaces). While the contents of commits
should be safe, concurrent modification of a repository from different computers
might conceivably lose some bookmark pointers. Note that, unlike in pure
Git, losing a bookmark pointer does not lead to losing commits.
diff --git a/docs/windows.md b/docs/windows.md
index 24f7137e5..88092066d 100644
--- a/docs/windows.md
+++ b/docs/windows.md
@@ -14,7 +14,7 @@ config in sync[^1].
!!! note
- If you created a colocated git repo, forget to keep these 2 settings in
+ If you created a colocated git workspace, forget to keep these 2 settings in
sync, and result in a dirty working copy with only EOL diffs, you can set
the `working-copy.eol-conversion` setting correctly and run `jj abandon` to
fix it.
@@ -54,7 +54,7 @@ converting them to CRLF. You'll want to make sure any tooling you use,
especially IDEs, preserve LF line endings.
[^1]: This poses the question if we should support reading the `core.autocrlf`
- setting in colocated repos. See details at the
+ setting in colocated workspaces. See details at the
[issue][read-git-config-issue].
[^2]: To detect if a file is binary, Jujutsu currently checks if there is 0 byte
in the file which is different from the algorithm of
@@ -127,5 +127,5 @@ system. This requires Windows 10 version 14972 or higher, as well as Developer
Mode. If those conditions are not satisfied, `jj` will materialize symlinks as
ordinary files.
-For colocated repositories, Git support must also be enabled using the
+For colocated workspaces, Git support must also be enabled using the
`git config` option `core.symlinks=true`.
diff --git a/lib/src/git_subprocess.rs b/lib/src/git_subprocess.rs
index ffdab6610..9f43b043e 100644
--- a/lib/src/git_subprocess.rs
+++ b/lib/src/git_subprocess.rs
@@ -121,8 +121,8 @@ impl<'a> GitSubprocessContext<'a> {
// config to be false for subprocess operations in order to avoid these
// interactions.
//
- // In a colocated repo, the daemon will still get started the first time a `git`
- // command is run manually if the gitconfigs are set up that way.
+ // In a colocated workspace, the daemon will still get started the first
+ // time a `git` command is run manually if the gitconfigs are set up that way.
.args(["-c", "core.fsmonitor=false"])
// Avoids an error message when fetching repos with submodules if
// user has `submodule.recurse` configured to true in their Git
diff --git a/lib/tests/test_git.rs b/lib/tests/test_git.rs
index bab53e906..148edd0fe 100644
--- a/lib/tests/test_git.rs
+++ b/lib/tests/test_git.rs
@@ -502,7 +502,8 @@ fn test_import_refs_reimport_git_head_does_not_count() {
#[test]
fn test_import_refs_reimport_git_head_without_ref() {
- // Simulate external `git checkout` in colocated repo, from anonymous bookmark.
+ // Simulate external `git checkout` in colocated workspace, from anonymous
+ // bookmark.
let test_repo = TestRepo::init_with_backend(TestRepoBackend::Git);
let repo = &test_repo.repo;
let git_repo = get_git_repo(repo);
@@ -537,7 +538,7 @@ fn test_import_refs_reimport_git_head_without_ref() {
#[test]
fn test_import_refs_reimport_git_head_with_moved_ref() {
- // Simulate external history rewriting in colocated repo.
+ // Simulate external history rewriting in colocated workspace.
let test_repo = TestRepo::init_with_backend(TestRepoBackend::Git);
let repo = &test_repo.repo;
let git_repo = get_git_repo(repo);
@@ -1215,7 +1216,7 @@ fn test_import_refs_reimport_absent_tracked_remote_tags() {
#[test]
fn test_import_refs_reimport_git_head_with_fixed_ref() {
- // Simulate external `git checkout` in colocated repo, from named bookmark.
+ // Simulate external `git checkout` in colocated workspace, from named bookmark.
let test_repo = TestRepo::init_with_backend(TestRepoBackend::Git);
let repo = &test_repo.repo;
let git_repo = get_git_repo(repo);