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 new: add --no-edit flag, allow repeating some flags #2607

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

ilyagr
Copy link
Contributor

@ilyagr ilyagr commented Nov 20, 2023

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • (n/a) 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 November 20, 2023 22:39
@ilyagr ilyagr force-pushed the noedit branch 5 times, most recently from fe31cad to ead43db Compare November 21, 2023 00:09
cli/tests/test_new_command.rs Outdated Show resolved Hide resolved
cli/tests/test_new_command.rs Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Repeating these is a no-op. This allows:

```shell
jj new -r a -r b # Equivalent to jj new a b
jj new --before a --before b  # Equivalent to jj new a b --before
```

I keep typing the latter and getting an annoying error.
This allows, for example, creating a merge commit with `jj new a b --no-edit -m Merge`, without
affecting the working copy.
@ilyagr ilyagr changed the title cli new: add --no-edit flag, make no-op flags more lenient cli new: add --no-edit flag, allow repeating some flags Nov 22, 2023
@ilyagr ilyagr merged commit 811ac5f into jj-vcs:main Nov 23, 2023
15 checks passed
@ilyagr ilyagr deleted the noedit branch November 23, 2023 19:15
@ilyagr ilyagr restored the noedit branch November 23, 2023 19:15
@ilyagr ilyagr deleted the noedit branch November 23, 2023 19:32
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