Skip to content

cli: error when inside a git repo inside of a jj repo#9154

Draft
Benjamin-Davies wants to merge 1 commit intojj-vcs:mainfrom
Benjamin-Davies:push-swruytypnowp
Draft

cli: error when inside a git repo inside of a jj repo#9154
Benjamin-Davies wants to merge 1 commit intojj-vcs:mainfrom
Benjamin-Davies:push-swruytypnowp

Conversation

@Benjamin-Davies
Copy link
Contributor

When the user is inside a Git repo that is itself inside of a JJ repo, there's a fairly good chance that the user intended to act on the inner repo and didn't realise it wasn't colocated with a JJ repo yet. This change modifies find_workspace_dir to also return Git repos and adds a new error hint to be shown in this nested repos situation.

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/updated tests to cover my changes
  • I fully understand the code that I am submitting (what it does,
    how it works, how it's organized), including any code drafted by an LLM.
  • For any prose generated by an LLM, I have proof-read and copy-edited with
    an eye towards deleting anything that is irrelevant, clarifying anything
    that is confusing, and adding details that are relevant. This includes,
    for example, commit descriptions, PR descriptions, and code comments.

When the user is inside a Git repo that is itself inside of a JJ repo,
there's a fairly good chance that the user intended to act on the inner
repo and didn't realise it wasn't colocated with a JJ repo yet. This
change modifies `find_workspace_dir` to also return Git repos and adds a
new error hint to be shown in this nested repos situation.
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.

1 participant