-
Notifications
You must be signed in to change notification settings - Fork 530
jj split
of a newly added executable file does not commit file as executable
#3846
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
Comments
@arxanas: What are we supposed to pass into scm-record in this case? We currently don't add a mode section if the file was absent on one side because we intended for the mode from the other side to be preserved, but that does happen here. Is |
Here is the documentation for
@martinvonz I think it's the "before" case you're describing, so the file mode doesn't appear in the "after" version. What the caller was "supposed" to do is always have a
Maybe Also, maybe |
I just ran into this issue, and it took me three attempts to realize I was expecting this to be the behaviour of I can't speak for everyone, but I cannot think of a situation where I create a new file with executable permissions that I would not want Although I expect to commit the entire contents of the script virtually every time, I think this makes sense even if I commit a subset. (Otherwise, I would have waited to put the executable flag on it.) Now that I know what's going on I can work around it, but I think it would be great to fix for future |
I can confirm that #3846 is working well for me with |
## [0.28.1] - 2025-04-04 ### Security fixes * Fixed SHA-1 collision attacks not being detected. ([GHSA-794x-2rpg-rfgr](GHSA-794x-2rpg-rfgr)) ### Fixed bugs * Resolved some potential build issues for packagers. [#6232](jj-vcs/jj#6232) * Fix a bug with `:ours` and `:theirs` merge tools involving conflicted trees with more than two sides. [#6227](jj-vcs/jj#6227) ## [0.28.0] - 2025-04-02 ### Release highlights * jj's configuration can now be split into multiple files more easily. * `jj resolve` now accepts built-in tools `:ours` and `:theirs`. * In colocated repos, newly-created files will now appear in `git diff`. * A long-standing bug relating to empty files in the built-in diff editor was fixed. [#3702](jj-vcs/jj#3702) ### Breaking changes * The minimum supported Rust version (MSRV) is now 1.84.0. * The `git.push-branch-prefix` config has been removed in favor of `git.push-bookmark-prefix`. * `jj abandon` no longer supports `--summary` to suppress the list of abandoned commits. The list won't show more than 10 commits to not clutter the console. * `jj unsquash` has been removed in favor of `jj squash` and `jj diffedit --restore-descendants`. * The `jj untrack` subcommand has been removed in favor of `jj file untrack`. * The following deprecated revset functions have been removed: - `branches()`, `remote_branches()`, `tracked_remote_branches()`, and `untracked_remote_branches()`, which were renamed to "bookmarks". - `file()` and `conflict()`, which were renamed to plural forms. - `files(x, y, ..)` with multiple patterns. Use `files(x|y|..)` instead. * The following deprecated template functions have been removed: - `branches()`, `local_branches()`, and `remote_branches()`, which were renamed to "bookmarks". * The flags `--all` and `--tracked` on `jj git push` by themself do not cause deleted bookmarks to be pushed anymore, as an additional safety measure. They can now be combined with `--deleted` instead. ### Deprecations * `core.watchman.register_snapshot_trigger` has been renamed to `core.watchman.register-snapshot-trigger` for consistency with other configuration options. * `jj backout` is deprecated in favor of `jj revert`. ### New features * `jj sign` can now sign with PKCS#12 certificates through the `gpgsm` backend. * `jj sign` will automatically use the gpg key associated with the author's email in the absence of a `signing.key` configuration. * Multiple user configs are now supported and are loaded in the following precedence order: - `$HOME/.jjconfig.toml` - `$XDG_CONFIG_HOME/jj/config.toml` - `$XDG_CONFIG_HOME/jj/conf.d/*.toml` * The `JJ_CONFIG` environment variable can now contain multiple paths separated by a colon (or semicolon on Windows). * The command `jj config list` now supports showing the origin of each variable via the `builtin_config_list_detailed` template. * `jj config {edit,set,unset}` now prompt when multiple config files are found. * `jj diff -r` now allows multiple revisions (as long as there are no gaps in the revset), such as `jj diff -r 'mutable()'`. * `jj git push` now accepts a `--named NAME=REVISION` argument to create a named bookmark and immediately push it. * The 'how to resolve conflicts' hint that is shown when conflicts appear can be hidden by setting `hints.resolving-conflicts = false`. * `jj op diff` and `jj op log --op-diff` now show changes to which commits correspond to working copies. * `jj op log -d` is now an alias for `jj op log --op-diff`. * `jj bookmark move --to/--from` can now be abbreviated to `jj bookmark move -t/-f` * `jj bookmark list` now supports `--sort` option. Similar to `git branch --sort`. See `jj bookmark list --help` for more details. * A new command `jj revert` is added, which is similar to `jj backout` but adds the `--destination`, `--insert-after`, and `--insert-before` options to customize the location of reverted commits. * A new command `jj git root` is added, which prints the location of the Git directory of a repository using the Git backend. * In colocated repos, any files that jj considers added in the working copy will now show up in `git diff` (as if you had run `git add --intent-to-add` on them). * Reversing colors is now supported. For example, to highlight words by reversing colors rather than underlining, you can set `colors."diff token"={ underline = false, reverse = true }` in your config. * Added `revsets.log-graph-prioritize`, which can be used to configure which branch in the `jj log` graph is displayed on the left instead of `@` (e.g. `coalesce(description("megamerge\n"), trunk())`) * `jj resolve` now accepts new built-in merge tools `:ours` and `:theirs`. These merge tools accept side #1 and side #2 of the conflict respectively. ### Fixed bugs * `jj log -p --stat` now shows diff stats as well as the default color-words/git diff output. [#5986](jj-vcs/jj#5986) * The built-in diff editor now correctly handles deleted files. [#3702](jj-vcs/jj#3702) * The built-in diff editor now correctly retains the executable bit on newly added files when splitting. [#3846](jj-vcs/jj#3846) * `jj config set`/`--config` value parsing rule is relaxed in a way that unquoted apostrophes are allowed. [#5748](jj-vcs/jj#5748) * `jj fix` could previously create new conflicts when a descendant of a fixed revision was already correctly formatted.
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [martinvonz/jj](https://github.com/martinvonz/jj) | minor | `v0.27.0` -> `v0.29.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>martinvonz/jj (martinvonz/jj)</summary> ### [`v0.29.0`](https://github.com/jj-vcs/jj/releases/tag/v0.29.0) [Compare Source](jj-vcs/jj@v0.28.2...v0.29.0) ##### About jj is a Git-compatible version control system that is both simple and powerful. See the [installation instructions](https://jj-vcs.github.io/jj/v0.29.0/install-and-setup/) to get started. ##### Release highlights - Experimental support for transferring the change ID to/from Git remotes behind configuration setting `git.write-change-id-header`. If this is enabled, the change ID will be stored in the Git commit itself (in a commit header called `change-id`), which means it will be transferred by regular `git push` etc. This is an evolving feature that currently defaults to "false". This default will likely change in the future as we gain confidence with forge support and user expectations. ##### Breaking changes - `jj git push -c`/`--change` no longer moves existing local bookmarks. - The `editor-*.jjdescription` files passed to your editor by e.g. `jj describe` are now written to your system's temporary directory instead of `.jj/repo/`. ##### Deprecations - `git.subprocess = false` has been deprecated, and the old `libgit2` code path for fetches and pushes will be removed entirely in 0.30. Please report any remaining issues you have with the Git subprocessing path. - `ui.default-description` has been deprecated, and will be migrated to `template-aliases.default_commit_description`. Please also consider using [`templates.draft_commit_description`](docs/config.md#default-description), and/or [`templates.commit_trailers`](docs/config.md#commit-trailers). - On macOS, config.toml files in `~/Library/Application Support/jj` are deprecated; one should instead use `$XDG_CONFIG_HOME/jj` (defaults to `~/.config/jj`) ##### New features - Color-words diff has gained [an option to compare conflict pairs without materializing](docs/config.md#color-words-diff-options). - `jj show` patches can now be suppressed with `--no-patch`. - Added `ui.bookmark-list-sort-keys` setting to configure default sort keys for the `jj bookmark list` command. - New `signed` revset function to filter for cryptographically signed commits. - `jj describe`, `jj commit`, `jj new`, `jj squash` and `jj split` add the commit trailers, configured in the `commit_trailers` template, to the commit description. Use cases include DCO Sign Off and Gerrit Change Id. - Added `duplicate_description` template, which allows [customizing the descriptions of the commits `jj duplicate` creates](docs/config.md#duplicate-commit-description). - `jj absorb` can now squash a deleted file if it was added by one of the destination revisions. - Added `ui.streampager.show-ruler` setting to configure whether the ruler should be shown when the builtin pager starts up. - `jj git fetch` now warns instead of erroring for unknown `git.fetch` remotes if other remotes are available. - Commit objects in templates now have `trailers() -> List<Trailer>`, the Trailer objects have `key() -> String` and `value() -> String`. - `jj config edit` will now roll back to previous version if a syntax error has been introduced in the new config. - When using dynamic command-line completion, revision names will be completed in more complex expressions. For example, typing `jj log -r first-bookmark..sec` and then pressing Tab could complete the expression to `first-bookmark..second-bookmark`. ##### Fixed bugs - Fixed crash on change-delete conflict resolution. [#​6250](jj-vcs/jj#6250) - The builtin diff editor now tries to preserve unresolved conflicts. [#​4963](jj-vcs/jj#4963) - Fixed bash and zsh shell completion when completing aliases of multiple arguments. [#​5377](jj-vcs/jj#5377) ##### Packaging changes - Jujutsu now uses [`zlib-rs`](https://github.com/trifectatechfoundation/zlib-rs), a fast compression library written in Rust. Packagers should remove any dependency on CMake and drop the `packaging` Cargo feature. ##### Contributors Thanks to the people who made this release happen! - Aleksey Kuznetsov ([@​zummenix](https://github.com/zummenix)) - Austin Seipp ([@​thoughtpolice](https://github.com/thoughtpolice)) - Benjamin Brittain ([@​benbrittain](https://github.com/benbrittain)) - Benjamin Tan ([@​bnjmnt4n](https://github.com/bnjmnt4n)) - Caleb White ([@​calebdw](https://github.com/calebdw)) - Daniel Luz ([@​mernen](https://github.com/mernen)) - Emily ([@​emilazy](https://github.com/emilazy)) - Emily ([@​neongreen](https://github.com/neongreen)) - Gaëtan Lehmann ([@​glehmann](https://github.com/glehmann)) - George Christou ([@​gechr](https://github.com/gechr)) - Ilya Grigoriev ([@​ilyagr](https://github.com/ilyagr)) - Jacob Hayes ([@​JacobHayes](https://github.com/JacobHayes)) - Jonas Greitemann ([@​jgreitemann](https://github.com/jgreitemann)) - Josh Steadmon ([@​steadmon](https://github.com/steadmon)) - Martin von Zweigbergk ([@​martinvonz](https://github.com/martinvonz)) - Mateus Auler ([@​mateusauler](https://github.com/mateusauler)) - Nicole Patricia Mazzuca ([@​strega-nil](https://github.com/strega-nil)) - Nils Koch ([@​nilskch](https://github.com/nilskch)) - Philip Metzger ([@​PhilipMetzger](https://github.com/PhilipMetzger)) - Remo Senekowitsch ([@​senekor](https://github.com/senekor)) - Sam ([@​Samasaur1](https://github.com/Samasaur1)) - Steve Fink ([@​hotsphink](https://github.com/hotsphink)) - Théo Daron ([@​tdaron](https://github.com/tdaron)) - TimerErTim ([@​TimerErTim](https://github.com/TimerErTim)) - Vincent Ging Ho Yim ([@​cenviity](https://github.com/cenviity)) - Winter ([@​winterqt](https://github.com/winterqt)) - Yuya Nishihara ([@​yuja](https://github.com/yuja)) ### [`v0.28.2`](https://github.com/jj-vcs/jj/releases/tag/v0.28.2) [Compare Source](jj-vcs/jj@v0.28.1...v0.28.2) ##### Fixed bugs - Fixed problem that old commits could be re-imported from Git. GitoxideLabs/gitoxide#1928 ### [`v0.28.1`](https://github.com/jj-vcs/jj/releases/tag/v0.28.1) [Compare Source](jj-vcs/jj@v0.28.0...v0.28.1) > \[!NOTE]\ > Also see the [v0.28.0 release notes](https://github.com/jj-vcs/jj/releases/tag/v0.28.0). ##### About jj is a Git-compatible version control system that is both simple and powerful. See the [installation instructions](https://jj-vcs.github.io/jj/v0.28.0/install-and-setup/) to get started. ##### Security fixes - Fixed SHA-1 collision attacks not being detected. ([GHSA-794x-2rpg-rfgr](GHSA-794x-2rpg-rfgr)) ##### Fixed bugs - Resolved some potential build issues for packagers. [#​6232](jj-vcs/jj#6232) - Fix a bug with `:ours` and `:theirs` merge tools involving conflicted trees with more than two sides. [#​6227](jj-vcs/jj#6227) ##### Contributors Thanks to the people who made this release happen! - Emily ([@​emilazy](https://github.com/emilazy)) - Ilya Grigoriev ([@​ilyagr](https://github.com/ilyagr)) - Nicole Patricia Mazzuca ([@​strega-nil](https://github.com/strega-nil)) - Scott Taylor ([@​scott2000](https://github.com/scott2000)) - Yuya Nishihara ([@​yuja](https://github.com/yuja)) ### [`v0.28.0`](https://github.com/jj-vcs/jj/releases/tag/v0.28.0) [Compare Source](jj-vcs/jj@v0.27.0...v0.28.0) > \[!IMPORTANT] > v0.28.0 was yanked from https://crates.io and superseded by [v0.28.1](https://github.com/jj-vcs/jj/releases/tag/v0.28.1). ##### About jj is a Git-compatible version control system that is both simple and powerful. See the [installation instructions](https://jj-vcs.github.io/jj/v0.28.0/install-and-setup/) to get started. ##### Release highlights - jj's configuration can now be split into multiple files more easily. - `jj resolve` now accepts built-in tools `:ours` and `:theirs`. - In colocated repos, newly-created files will now appear in `git diff`. - A long-standing bug relating to empty files in the built-in diff editor was fixed. [#​3702](jj-vcs/jj#3702) ##### Breaking changes - The minimum supported Rust version (MSRV) is now 1.84.0. - The `git.push-branch-prefix` config has been removed in favor of `git.push-bookmark-prefix`. - `jj abandon` no longer supports `--summary` to suppress the list of abandoned commits. The list won't show more than 10 commits to not clutter the console. - `jj unsquash` has been removed in favor of `jj squash` and `jj diffedit --restore-descendants`. - The `jj untrack` subcommand has been removed in favor of `jj file untrack`. - The following deprecated revset functions have been removed: - `branches()`, `remote_branches()`, `tracked_remote_branches()`, and `untracked_remote_branches()`, which were renamed to "bookmarks". - `file()` and `conflict()`, which were renamed to plural forms. - `files(x, y, ..)` with multiple patterns. Use `files(x|y|..)` instead. - The following deprecated template functions have been removed: - `branches()`, `local_branches()`, and `remote_branches()`, which were renamed to "bookmarks". - The flags `--all` and `--tracked` on `jj git push` by themself do not cause deleted bookmarks to be pushed anymore, as an additional safety measure. They can now be combined with `--deleted` instead. ##### Deprecations - `core.watchman.register_snapshot_trigger` has been renamed to `core.watchman.register-snapshot-trigger` for consistency with other configuration options. - `jj backout` is deprecated in favor of `jj revert`. ##### New features - `jj sign` can now sign with [PKCS#12](https://github.com/PKCS/jj/issues/12) certificates through the `gpgsm` backend. - `jj sign` will automatically use the gpg key associated with the author's email in the absence of a `signing.key` configuration. - Multiple user configs are now supported and are loaded in the following precedence order: - `$HOME/.jjconfig.toml` - `$XDG_CONFIG_HOME/jj/config.toml` - `$XDG_CONFIG_HOME/jj/conf.d/*.toml` - The `JJ_CONFIG` environment variable can now contain multiple paths separated by a colon (or semicolon on Windows). - The command `jj config list` now supports showing the origin of each variable via the `builtin_config_list_detailed` template. - `jj config {edit,set,unset}` now prompt when multiple config files are found. - `jj diff -r` now allows multiple revisions (as long as there are no gaps in the revset), such as `jj diff -r 'mutable()'`. - `jj git push` now accepts a `--named NAME=REVISION` argument to create a named bookmark and immediately push it. - The 'how to resolve conflicts' hint that is shown when conflicts appear can be hidden by setting `hints.resolving-conflicts = false`. - `jj op diff` and `jj op log --op-diff` now show changes to which commits correspond to working copies. - `jj op log -d` is now an alias for `jj op log --op-diff`. - `jj bookmark move --to/--from` can now be abbreviated to `jj bookmark move -t/-f` - `jj bookmark list` now supports `--sort` option. Similar to `git branch --sort`. See `jj bookmark list --help` for more details. - A new command `jj revert` is added, which is similar to `jj backout` but adds the `--destination`, `--insert-after`, and `--insert-before` options to customize the location of reverted commits. - A new command `jj git root` is added, which prints the location of the Git directory of a repository using the Git backend. - In colocated repos, any files that jj considers added in the working copy will now show up in `git diff` (as if you had run `git add --intent-to-add` on them). - Reversing colors is now supported. For example, to highlight words by reversing colors rather than underlining, you can set `colors."diff token"={ underline = false, reverse = true }` in your config. - Added `revsets.log-graph-prioritize`, which can be used to configure which branch in the `jj log` graph is displayed on the left instead of `@` (e.g. `coalesce(description("megamerge\n"), trunk())`) - `jj resolve` now accepts new built-in merge tools `:ours` and `:theirs`. These merge tools accept side [#​1](jj-vcs/jj#1) and side [#​2](jj-vcs/jj#2) of the conflict respectively. ##### Fixed bugs - `jj log -p --stat` now shows diff stats as well as the default color-words/git diff output. [#​5986](jj-vcs/jj#5986) - The built-in diff editor now correctly handles deleted files. [#​3702](jj-vcs/jj#3702) - The built-in diff editor now correctly retains the executable bit on newly added files when splitting. [#​3846](jj-vcs/jj#3846) - `jj config set`/`--config` value parsing rule is relaxed in a way that unquoted apostrophes are allowed. [#​5748](jj-vcs/jj#5748) - `jj fix` could previously create new conflicts when a descendant of a fixed revision was already correctly formatted. ##### Contributors Thanks to the people who made this release happen! - Aleksey Kuznetsov ([@​zummenix](https://github.com/zummenix)) - Anton Älgmyr ([@​algmyr](https://github.com/algmyr)) - Austin Seipp ([@​thoughtpolice](https://github.com/thoughtpolice)) - Baltasar Dinis ([@​bsdinis](https://github.com/bsdinis)) - Benjamin Tan ([@​bnjmnt4n](https://github.com/bnjmnt4n)) - Brandon Hall ([@​tenkabuto](https://github.com/tenkabuto)) - Caleb White ([@​calebdw](https://github.com/calebdw)) - Daniel Luz ([@​mernen](https://github.com/mernen)) - David Rieber ([@​drieber](https://github.com/drieber)) - demize ([@​demize](https://github.com/demize)) - Emily ([@​emilazy](https://github.com/emilazy)) - Evan Mesterhazy ([@​emesterhazy](https://github.com/emesterhazy)) - Fedor Sheremetyev ([@​sheremetyev](https://github.com/sheremetyev)) - George Christou ([@​gechr](https://github.com/gechr)) - Ilya Grigoriev ([@​ilyagr](https://github.com/ilyagr)) - Jakob Hellermann ([@​jakobhellermann](https://github.com/jakobhellermann)) - Jo Liss ([@​joliss](https://github.com/joliss)) - Joachim Desroches ([@​jedesroches](https://github.com/jedesroches)) - Johannes Altmanninger ([@​krobelus](https://github.com/krobelus)) - Jonathan Gilchrist ([@​jgilchrist](https://github.com/jgilchrist)) - Kenyon Ralph ([@​kenyon](https://github.com/kenyon)) - Lucas Garron ([@​lgarron](https://github.com/lgarron)) - Martin von Zweigbergk ([@​martinvonz](https://github.com/martinvonz)) - Nick Pupko ([@​npupko](https://github.com/npupko)) - Philip Metzger ([@​PhilipMetzger](https://github.com/PhilipMetzger)) - Raphael Borun Das Gupta ([@​das-g](https://github.com/das-g)) - Remo Senekowitsch ([@​senekor](https://github.com/senekor)) - Robin Stocker ([@​robinst](https://github.com/robinst)) - Scott Taylor ([@​scott2000](https://github.com/scott2000)) - Siva Mahadevan ([@​svmhdvn](https://github.com/svmhdvn)) - Vincent Ging Ho Yim ([@​cenviity](https://github.com/cenviity)) - Yuya Nishihara ([@​yuja](https://github.com/yuja)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4xMS4yIiwidXBkYXRlZEluVmVyIjoiNDAuMTEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Description
Steps to Reproduce the Problem
Expected Behavior
Files committed via
jj split
should also commit their metadata changes (such as +x).Actual Behavior
The file contents are committed, but not the metadata
Specifications
The text was updated successfully, but these errors were encountered: