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

cli: use cwd-relative workspace config to resolve default command and aliases #2740

Merged
merged 4 commits into from
Dec 23, 2023

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Dec 23, 2023

#2414

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

yuja added 4 commits December 23, 2023 20:52
In order to load command aliases from .jj/repo/config.toml, WorkspaceLoader
will be changed to be instantiated earlier with the cwd path.
It should be better to handle invalid -R path globally. The error message is
a bit worse, but I think it's still okay.

This helps to load temporary config from the cwd-relative path. If the command
processing continued with an invalid -R path, the temporary config would have
to be explicitly discarded.
… aliases

This is basically the same as Mercurial's workaround. I don't know about Git,
but arguments order is very restricted in git, so -C path can be parsed prior
to alias expansion. In hg and jj, doing that would be messy and unreliable.

Closes jj-vcs#2414
@yuja yuja force-pushed the push-pupvwktoxyzx branch from f70520f to 6c6e920 Compare December 23, 2023 11:53
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 for fixing

@yuja yuja merged commit 1836a10 into jj-vcs:main Dec 23, 2023
15 checks passed
@yuja yuja deleted the push-pupvwktoxyzx branch December 23, 2023 15:20
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.

2 participants