Skip to content

Conversation

@wetneb
Copy link
Contributor

@wetneb wetneb commented Aug 18, 2025

This follows Git's merge driver interface which makes this information available using the %P variable. It is useful for merge drivers to adapt their behaviour based on the type of file supplied.

The motivation for this is that Mergiraf uses this information to determine the format of the file and parse its revisions accordingly. When the file format is determined by the file extension only, there is no need for this extra information as the file names of the base, left and right revisions will still have this extension (such as base_main.rs, left_main.rs, right_main.rs). But for files where the format is recognized by matching the entire file name, this will not work: base_Makefile isn't recognized on its own. However, when -p src/Makefile is provided, the tool is able to pick the right parsers.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added/updated tests to cover my changes. (This area of the code does not seem to have any tests as far as I can tell)

@wetneb wetneb requested a review from a team as a code owner August 18, 2025 20:20
@google-cla
Copy link

google-cla bot commented Aug 18, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@OvidiusCicero
Copy link
Contributor

@jj-vcs/maintainers can someone please have a look?

I like it and the implementation seems quite reasonable to me

Copy link
Member

@bnjmnt4n bnjmnt4n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. I suspect we might want to rename the variable to $path instead for consistency withjj fix.

@wetneb wetneb force-pushed the repo_path branch 2 times, most recently from 541151a to e9410e1 Compare September 11, 2025 11:13
This follows Git's merge driver interface which makes this information
available using the `%P` variable. It is useful for merge drivers to
adapt their behaviour based on the type of file supplied.
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@algmyr
Copy link
Member

algmyr commented Sep 29, 2025

So what should have happened here is that you should have been added to contributors so you can merge your own PR. I'll merge it for now, but some maintainer should give you the role for future PRs.

@algmyr algmyr added this pull request to the merge queue Sep 29, 2025
Merged via the queue into jj-vcs:main with commit 589ed83 Sep 29, 2025
52 of 53 checks passed
@wetneb
Copy link
Contributor Author

wetneb commented Sep 29, 2025

@algmyr fascinating! I'm very interested in FOSS governance so I'm curious how this invitation to the contributors team is supposed to happen. Is there some automation behind it, perhaps? Or is it the responsibility of a particular person/team?

@algmyr
Copy link
Member

algmyr commented Sep 30, 2025

There is no automation at the moment, and I think only the team of Maintainers have the power to give the membership. Sadly forgetting to add people happens more often than it should.

I hope #7606 should help with the not forgetting part once we get that in.

@jj-vcs/maintainers Can anyone add wetneb to contributors?

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.

5 participants