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

local_working_copy: when all sides of a conflict are executable, mate… #3580

Conversation

gulbanana
Copy link
Contributor

local_working_copy: when all sides of a conflict are executable, materialise the conflicted file as executable

Fixes #3579 and adds a testcase for an executable conflict treevalue.

@gulbanana
Copy link
Contributor Author

The new test fails before the fix and passes after it. This repro script can also be used to verify:

#!/usr/bin/env bash

mkdir repro_permfail
cd repro_permfail/

jj git init

cat <<EOF > script.sh
#!/usr/bin/bash
echo "No conflict here."
EOF
chmod 755 script.sh

jj desc -m "script import"
jj new -m "set up for conflict"
jj branch create setup-conflict
cat <<EOF >> script.sh
echo "Half a conflict."
EOF

jj new -r @- -m "create a conflict"

cat <<EOF >> script.sh
echo "The other half."
EOF

jj rebase -d setup-conflict

lib/src/local_working_copy.rs Show resolved Hide resolved
lib/src/local_working_copy.rs Show resolved Hide resolved
lib/src/merge.rs Outdated Show resolved Hide resolved
@gulbanana gulbanana force-pushed the 3579-conflict-on-rebase-clears-execute-flag-on-script branch 4 times, most recently from 9d5d743 to 00b1912 Compare May 4, 2024 13:21
@gulbanana
Copy link
Contributor Author

Thanks for the reviews. I've addressed the feedback, and added a second commit which fixes some clippy warnings which were output only on windows - turns out that the cfged out behaviour around the executable bit has been triggering lints, but our PR checks weren't catching them.

@martinvonz
Copy link
Member

added a second commit which fixes some clippy warnings which were output only on windows - turns out that the cfged out behaviour around the executable bit has been triggering lints, but our PR checks weren't catching them.

Thanks. I suppose we could also run clippy on windows. Not sure it's worth the resource cost given how infrequently it's going to find anything.

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!

CHANGELOG.md Show resolved Hide resolved
lib/src/local_working_copy.rs Show resolved Hide resolved
gulbanana added 2 commits May 21, 2024 14:02
…rialise the conflicted file as executable

Fixes jj-vcs#3579 and adds a testcase for an executable conflict treevalue.
@gulbanana gulbanana force-pushed the 3579-conflict-on-rebase-clears-execute-flag-on-script branch from 00b1912 to 8739434 Compare May 21, 2024 06:07
@gulbanana gulbanana merged commit 13c8f32 into jj-vcs:main May 21, 2024
16 checks passed
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.

Conflict on rebase clears execute flag on script
3 participants