Skip to content

Fix merge conflict resolution bug - #5999

Merged
knolleary merged 1 commit into
v4.xfrom
merge-conflict-treeish-v4x
Oct 12, 2026
Merged

knolleary merged 1 commit into
v4.xfrom
merge-conflict-treeish-v4x

Conversation

@knolleary

Copy link
Copy Markdown
Member

Backport from 5.0.1

8011f1a (Sanitize all args passed to projects/git api) introduced a regression in packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/git/index.js:708 which caused getFile() to start validating treeish as a normal refname. That broke the existing merge-conflict UI, which reads conflicted files via git index stage selectors like :1, :2, and :3. As a result, flow-file conflict views showed no unresolved conflicts and saving the resolution would delete the conflicted flow entirely.
Fix by keeping the argument hardening but teaching getFile() to allow git stage treeishes :0..:3, and add a unit test covering stage-selector reads while still rejecting invalid ref-like input.
@knolleary
knolleary merged commit c1647b1 into v4.x Oct 12, 2026
5 checks passed
@knolleary
knolleary deleted the merge-conflict-treeish-v4x branch October 12, 2026 16:03
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