Skip to content

Commit

Permalink
Add a --siblings option to the jj split command
Browse files Browse the repository at this point in the history
If the --siblings option is used, the target commit is split into two sibling
commits instead of parent and child commits. Any children of the original
commit will have both sibilings as their new parents.


ISSUE=#2274
  • Loading branch information
emesterhazy committed Apr 1, 2024
1 parent ffc7311 commit 985c1f0
Show file tree
Hide file tree
Showing 4 changed files with 252 additions and 90 deletions.
113 changes: 54 additions & 59 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### New features

* Config now supports rgb hex colors (in the form `#rrggbb`) wherever existing color names are supported.
* Config now supports rgb hex colors (in the form `#rrggbb`) wherever existing color names are
supported.

* `ui.default-command` now accepts multiple string arguments, for more complex
default `jj` commands.

* Graph node symbols are now configurable via templates
* `templates.log_node`
* `templates.op_log_node`
* `templates.log_node`
* `templates.op_log_node`

* `jj log` now includes synthetic nodes in the graph where some revisions were
elided.
Expand All @@ -54,6 +55,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `jj duplicate` and `jj abandon` can now take more than a single `-r` argument,
for consistency with other commands.

* `jj split` now supports a `--siblings/-s` option that splits the target
revision into siblings with the same parents and children.

### Fixed bugs

## [0.15.1] - 2024-03-06
Expand Down Expand Up @@ -91,8 +95,8 @@ No code changes (fixing Rust `Cargo.toml` stuff).
commits when they are created.

This comes with out-of-the-box support for the following backends:
* GnuPG
* SSH
* GnuPG
* SSH

Signature verification and an explicit sign command will hopefully come soon.

Expand Down Expand Up @@ -138,7 +142,7 @@ No code changes (fixing Rust `Cargo.toml` stuff).

* `jj commit`/`diffedit`/`move`/`resolve`/`split`/`squash`/`unsquash` now accept
`--tool=<NAME>` option to override the default.
[#2575](https://github.com/martinvonz/jj/issues/2575)
[#2575](https://github.com/martinvonz/jj/issues/2575)

* Added completions for [Nushell](https://nushell.sh) to `jj util completion`

Expand All @@ -158,7 +162,7 @@ No code changes (fixing Rust `Cargo.toml` stuff).
When symlink support is unavailable, they will be materialized as regular files in the
working copy (instead of resulting in a crash).
[#2](https://github.com/martinvonz/jj/issues/2)

* On Windows, the `:builtin` pager is now used by default, rather than being
disabled entirely.

Expand Down Expand Up @@ -192,7 +196,6 @@ Thanks to the people who made this release happen!
* Vladimir (@0xdeafbeef)
* Yuya Nishihara (@yuja)


## [0.14.0] - 2024-02-07

### Deprecations
Expand All @@ -205,7 +208,7 @@ Thanks to the people who made this release happen!
copy commit on top of a single specified revision, i.e. with one parent.
`merge` creates a new working copy commit on top of *at least* two specified
revisions, i.e. with two or more parents.

The only difference between these commands and `jj new`, which *also* creates
a new working copy commit, is that `new` can create a working copy commit on
top of any arbitrary number of revisions, so it can handle both the previous
Expand All @@ -226,7 +229,6 @@ Thanks to the people who made this release happen!

Use `jj git init` instead.


### Breaking changes

* (Minor) Diff summaries (e.g. `jj diff -s`) now use `D` for "Deleted" instead
Expand Down Expand Up @@ -318,7 +320,6 @@ Thanks to the people who made this release happen!
* vwkd (@vwkd)
* Yuya Nishihara (@yuja)


## [0.13.0] - 2024-01-03

### Breaking changes
Expand Down Expand Up @@ -352,7 +353,6 @@ Thanks to the people who made this release happen!
* Waleed Khan (@arxanas)
* Yuya Nishihara (@yuja)


## [0.12.0] - 2023-12-05

### Breaking changes
Expand All @@ -362,7 +362,7 @@ Thanks to the people who made this release happen!

* `jj branch set` no longer creates a new branch. Use `jj branch create`
instead.

* `jj init --git` in an existing Git repository now errors and exits rather than
creating a second Git store.

Expand Down Expand Up @@ -413,7 +413,6 @@ Thanks to the people who made this release happen!
* Waleed Khan (@arxanas)
* Yuya Nishihara (@yuja)


## [0.11.0] - 2023-11-01

### Breaking changes
Expand All @@ -437,9 +436,9 @@ Thanks to the people who made this release happen!
`git.auto-local-branch` setting is applied only to newly fetched remote
branches. Existing remote branches are migrated as follows:

* If local branch exists, the corresponding remote branches are considered
tracking branches.
* Otherwise, the remote branches are non-tracking branches.
* If local branch exists, the corresponding remote branches are considered
tracking branches.
* Otherwise, the remote branches are non-tracking branches.

If the deduced tracking flags are wrong, use `jj branch track`/`untrack`
commands to fix them up.
Expand All @@ -461,7 +460,8 @@ Thanks to the people who made this release happen!

### New features

* `jj`'s stable release can now be installed with [`cargo binstall jj-cli`](https://github.com/cargo-bins/cargo-binstall).
* `jj`'s stable release can now be installed
with [`cargo binstall jj-cli`](https://github.com/cargo-bins/cargo-binstall).

* `jj workspace add` now takes a `--revision` argument.

Expand Down Expand Up @@ -514,7 +514,6 @@ Thanks to the people who made this release happen!
* Waleed Khan (@arxanas)
* Yuya Nishihara (@yuja)


## [0.10.0] - 2023-10-04

### Breaking changes
Expand All @@ -526,8 +525,8 @@ Thanks to the people who made this release happen!

### New features

* The `ancestors()` revset function now takes an optional `depth` argument
to limit the depth of the ancestor set. For example, use `jj log -r
* The `ancestors()` revset function now takes an optional `depth` argument
to limit the depth of the ancestor set. For example, use `jj log -r
'ancestors(@, 5)` to view the last 5 commits.

* Support for the Watchman filesystem monitor is now bundled by default. Set
Expand Down Expand Up @@ -577,7 +576,6 @@ Thanks to the people who made this release happen!
* Yuya Nishihara (@yuja)
* Zachary Dremann (@Dr-Emann)


## [0.9.0] - 2023-09-06

### Breaking changes
Expand Down Expand Up @@ -692,13 +690,13 @@ Thanks to the people who made this release happen!
respectively.

* `jj log` timestamp format now accepts `.utc()` to convert a timestamp to UTC.

* templates now support additional string methods `.starts_with(x)`, `.ends_with(x)`
`.remove_prefix(x)`, `.remove_suffix(x)`, and `.substr(start, end)`.

* `jj next` and `jj prev` are added, these allow you to traverse the history
in a linear style. For people coming from Sapling and `git-branchles`
see [#2126](https://github.com/martinvonz/jj/issues/2126) for
see [#2126](https://github.com/martinvonz/jj/issues/2126) for
further pending improvements.

* `jj diff --stat` has been implemented. It shows a histogram of the changes,
Expand Down Expand Up @@ -754,7 +752,6 @@ Thanks to the people who made this release happen!
* Yuya Nishihara (@yuja)
* Zachary Dremann (@Dr-Emann)


## [0.8.0] - 2023-07-09

### Breaking changes
Expand Down Expand Up @@ -955,7 +952,6 @@ Thanks to the people who made this release happen!
* Waleed Khan (@arxanas)
* Yuya Nishihara (@yuja)


## [0.7.0] - 2023-02-16

### Breaking changes
Expand Down Expand Up @@ -1151,25 +1147,25 @@ Thanks to the people who made this release happen!

Thanks to the people who made this release happen!

* Aleksandr Mikhailov (@AM5800)
* Augie Fackler (@durin42)
* Benjamin Saunders (@Ralith)
* Daniel Ploch (@torquestomp)
* Danny Hooper (@hooper)
* David Barnett (@dbarnett)
* Glen Choo (@chooglen)
* Herby Gillot (@herbygillot)
* Ilya Grigoriev (@ilyagr)
* Luke Granger-Brown (@lukegb)
* Martin von Zweigbergk (@martinvonz)
* Michael Forster (@MForster)
* Philip Metzger (@PhilipMetzger)
* Ruben Slabbert (@rslabbert)
* Samuel Tardieu (@samueltardieu)
* Tal Pressman (@talpr)
* Vamsi Avula (@avamsi)
* Waleed Khan (@arxanas)
* Yuya Nishihara (@yuja)
* Aleksandr Mikhailov (@AM5800)
* Augie Fackler (@durin42)
* Benjamin Saunders (@Ralith)
* Daniel Ploch (@torquestomp)
* Danny Hooper (@hooper)
* David Barnett (@dbarnett)
* Glen Choo (@chooglen)
* Herby Gillot (@herbygillot)
* Ilya Grigoriev (@ilyagr)
* Luke Granger-Brown (@lukegb)
* Martin von Zweigbergk (@martinvonz)
* Michael Forster (@MForster)
* Philip Metzger (@PhilipMetzger)
* Ruben Slabbert (@rslabbert)
* Samuel Tardieu (@samueltardieu)
* Tal Pressman (@talpr)
* Vamsi Avula (@avamsi)
* Waleed Khan (@arxanas)
* Yuya Nishihara (@yuja)

## [0.6.1] - 2022-12-05

Expand Down Expand Up @@ -1294,17 +1290,16 @@ No changes, only changed to a released version of the `thrift` crate dependency.

Thanks to the people who made this release happen!

* Martin von Zweigbergk (@martinvonz)
* Benjamin Saunders (@Ralith)
* Yuya Nishihara (@yuja)
* Glen Choo (@chooglen)
* Ilya Grigoriev (@ilyagr)
* Ruben Slabbert (@rslabbert)
* Waleed Khan (@arxanas)
* Sean E. Russell (@xxxserxxx)
* Pranay Sashank (@pranaysashank)
* Luke Granger-Brown (@lukegb)

* Martin von Zweigbergk (@martinvonz)
* Benjamin Saunders (@Ralith)
* Yuya Nishihara (@yuja)
* Glen Choo (@chooglen)
* Ilya Grigoriev (@ilyagr)
* Ruben Slabbert (@rslabbert)
* Waleed Khan (@arxanas)
* Sean E. Russell (@xxxserxxx)
* Pranay Sashank (@pranaysashank)
* Luke Granger-Brown (@lukegb)

## [0.5.1] - 2022-10-17

Expand Down Expand Up @@ -1569,9 +1564,9 @@ No changes, only trying to get the automated build to work.

### Fixed bugs

- Fixed crash when `core.excludesFile` pointed to nonexistent file, and made
leading `~/` in that config expand to `$HOME/`
[#131](https://github.com/martinvonz/jj/issues/131)
- Fixed crash when `core.excludesFile` pointed to nonexistent file, and made
leading `~/` in that config expand to `$HOME/`
[#131](https://github.com/martinvonz/jj/issues/131)

## [0.3.0] - 2022-03-12

Expand Down
Loading

0 comments on commit 985c1f0

Please sign in to comment.