Skip to content
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

docs: make co-located repos more prominent, explain them better #2183

Merged
merged 2 commits into from
Sep 6, 2023

Conversation

ilyagr
Copy link
Collaborator

@ilyagr ilyagr commented Aug 29, 2023

At this point, they are stable enough that I think we should
advertise them and encourage their use. This also explains
some caveats.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@ilyagr ilyagr marked this pull request as ready for review August 29, 2023 20:08
@ilyagr ilyagr force-pushed the colocated branch 9 times, most recently from 391bd3a to f20cf18 Compare August 29, 2023 20:20
Copy link
Collaborator

@PhilipMetzger PhilipMetzger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ilya! I only have a minor nit atm.

docs/technical/concurrency.md Outdated Show resolved Hide resolved
docs/git-compatibility.md Outdated Show resolved Hide resolved
@ilyagr
Copy link
Collaborator Author

ilyagr commented Aug 30, 2023

@yuja, I'm curious if you have any thoughts, especially in case I missed something important or said something misleading.

@ilyagr
Copy link
Collaborator Author

ilyagr commented Aug 30, 2023

I changed some paragraphs and fixed some typos.

Copy link
Member

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

docs/git-compatibility.md Outdated Show resolved Hide resolved
docs/git-compatibility.md Outdated Show resolved Hide resolved
docs/git-compatibility.md Show resolved Hide resolved
docs/git-compatibility.md Show resolved Hide resolved
@ilyagr ilyagr force-pushed the colocated branch 5 times, most recently from 2496543 to 9bb9f81 Compare September 5, 2023 03:47
@ilyagr
Copy link
Collaborator Author

ilyagr commented Sep 5, 2023

I think this is pretty much done, but I did a couple of moderately severe edits. I'll give people a bit of time to look them over.

I'd like this PR to go into 0.9.0, if possible. @martinvonz, if I haven't merged it and it's slowing you down, please feel free to merge it yourself.

This will be used for context in the next commit

Includes a mention of
jj-vcs#2193.
Copy link
Collaborator

@PhilipMetzger PhilipMetzger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

docs/git-compatibility.md Outdated Show resolved Hide resolved
@ilyagr
Copy link
Collaborator Author

ilyagr commented Sep 5, 2023 via email

@martinvonz
Copy link
Member

I'm pretty sure this covers read-only commands if the working copy hasn't changed.

I think the only case we don't detach it is when we just snapshot the working copy. For example, if you do jj describe -m foo, we're going to detach it. Maybe it's better to keep it attached in that case, but it's less clear if e.g. jj new @- (which also keeps the parent commit unchanged) should keep the branch attached.

@ilyagr
Copy link
Collaborator Author

ilyagr commented Sep 5, 2023 via email

@martinvonz
Copy link
Member

it's less clear if e.g. jj new @- (which also keeps the parent commit
unchanged) should keep the branch attached.

Why not? This only applies if we are already on a branch at the parent commit, and only affects git integration. Git is not really aware of the working copy commit, only of the contents.

It just feels like jj new @- might be meant to start a new line of work, rather than continuing the work on main. But I don't know how people work in colocated repos, so I don't really have any idea what they expect jj new @-; git commit -m foo to do.

@ilyagr
Copy link
Collaborator Author

ilyagr commented Sep 5, 2023

For my workflow, if I care about the branch at @-, I think jj new @- is essentially the same as jj abandon. The difference is that I reserve the right to go back to the "discarded" version.

Things are different if, say, @ has a branch on it. However, if Git thinks we're at a branch at @-, I probably got into this situation with a git switch, so I probably care about the branch at @-.

I might open a separate issue for this. (Update: done, #2210)

At this point, they are stable enough that I think we should
advertise them and encourage their use. This also explains
some caveats.
@ilyagr ilyagr merged commit 18bcc87 into jj-vcs:main Sep 6, 2023
15 checks passed
@ilyagr ilyagr deleted the colocated branch September 6, 2023 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants