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

jj split -i <paths> with an external merge tool includes other file into the first commit #5252

Closed
dotdash opened this issue Jan 3, 2025 · 0 comments
Assignees
Labels
🐛bug Something isn't working

Comments

@dotdash
Copy link

dotdash commented Jan 3, 2025

Description

When using jj split -i <paths> with an external merge tool, file that are added/change but not included in <paths> get added to the first commit. This is unexpected does not happen with the built-in editor

Steps to Reproduce the Problem

mkdir test; cd test; jj git init
echo 123 > file1; echo 456 > file2
jj commit -m init
echo 123 >> file1; echo 456 >> file2; echo xxx > file3
jj split --tool vimdiff file1
# Quit vimdiff, set split commit message etc.

Expected Behavior

The newly split commit only contains the modifications for file1.

Actual Behavior

The newly split commit contains the modifications for file1 and file2 as well as the newly added file3.

Specifications

  • Platform: Linux Debian Sid
  • Version: jj 0.25.0-041c4fecb77434dd6720e7d7f1ce48d9575ac5f7
@PhilipMetzger PhilipMetzger added the 🐛bug Something isn't working label Jan 3, 2025
@yuja yuja self-assigned this Jan 4, 2025
yuja added a commit to yuja/jj that referenced this issue Jan 4, 2025
This patch doesn't fix DiffEditor::edit() API, which is fundamentally broken
if matcher argument is specified. I'm not sure if the builtin behavior is
correct or not. Suppose we add "jj diffedit FILESETS..", it would probably make
sense to leave unmatched paths unmodified because it is the command to edit the
destination (or right) tree. This is the edit_diff_external() behavior.

Fixes jj-vcs#5252
yuja added a commit to yuja/jj that referenced this issue Jan 4, 2025
This patch doesn't fix DiffEditor::edit() API, which is fundamentally broken
if matcher argument is specified. I'm not sure if the builtin behavior is
correct or not. Suppose we add "jj diffedit FILESETS..", it would probably make
sense to leave unmatched paths unmodified because it is the command to edit the
destination (or right) tree. This is the edit_diff_external() behavior.

Fixes jj-vcs#5252
@yuja yuja closed this as completed in 0d022f1 Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants