-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colocated workspaces, minimal #4644
Open
cormacrelf
wants to merge
8
commits into
main
Choose a base branch
from
workspace-colocate-minimal
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,033
−67
Open
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
92bbf56
workspace: Make backend factories aware of the workspace root
cormacrelf 7e34182
workspace: Reload the repo from disk in `workspace add`
cormacrelf 0d72f0b
git: box all `gix::open::Error` as clippy keeps warning about it
cormacrelf 6c62985
git: Add MaybeColocatedGitRepo helper
cormacrelf 899ac30
git: make GitBackend colocation-aware
cormacrelf 64adf64
cli: warn when workspace/.git exists, but is not colocated
cormacrelf 3e4b0c1
workspace: add stopgap test helper to create a colocated workspace
cormacrelf 2923211
workspace: Add worktree support to MaybeColocatedGitRepo
cormacrelf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1334,6 +1334,7 @@ impl GitRepoData { | |
settings, | ||
store_path, | ||
git_repo.path(), | ||
Some(&jj_repo_dir), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be |
||
)?)) | ||
}, | ||
Signer::from_settings(&settings).unwrap(), | ||
|
@@ -2242,6 +2243,7 @@ fn test_init() { | |
settings, | ||
store_path, | ||
git_repo.path(), | ||
Some(&jj_repo_dir), | ||
)?)) | ||
}, | ||
Signer::from_settings(&settings).unwrap(), | ||
|
@@ -2601,6 +2603,7 @@ fn set_up_push_repos(settings: &UserSettings, temp_dir: &TempDir) -> PushTestSet | |
settings, | ||
store_path, | ||
clone_repo.path(), | ||
Some(&jj_repo_dir), | ||
)?)) | ||
}, | ||
Signer::from_settings(settings).unwrap(), | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this warning could be very noisy, so we should probably move it behind the future config flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same thought. Want me to add a flag in this PR?
git.suppress-colocation-warning
or something?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it can be verbose, I would remove the warning at all. Maybe the warning can be inserted to initialization/debug commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think landing it as is or with Yuya's suggestion is fine, but it should definitely move behind the auto-colocate workspace flag in the follow-up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jj git init
in an existing Git repo. To accomplish that you have to manually move files around.git init
in an existing JJ repo is what this is most likely to warn about.git.sync-with-colocated
or similar. I think that flag should be separate fromgit.auto-colocate
because of the use case I just described.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we would want a flag to disable import/export in colocated workspace, but that's a separate issue, so let's not discuss here.
Regarding the warning, suppose we have some concerns, I would remove it at least from this PR. I personally don't think we'll need these warnings, and there are no bug report about that iirc.