Keeping track of changes of imported code

Howdy,
Is there a mechanism for keeping track of needed changes when importing code from other OSs? Specifically utilities that are part of the core of FreeBSD, etc? Haikuports has the separate patch files when Haikuports is involved to review, but what about these type of projects?
Thanks

So you miss some user and programs, which is available on other systems? Or do we talking about code-segments? Or libs?

Sorry, missed a part in my initial question.
Specifically I wanting to look at updating portions of our utilities that we have imported from the BSDs (like ftpd) and that got me thinking how our needed changes are saved. Or is the process literally just comparing the two next to each other.

AFAIK ftpd got outsourced to haikuports…

But if a program imported, you can check the git log, it should mention the imported version, or you can track down the version from the import date.

You might be thinking of tnftpd.

Back when we used SVN we used “vendor branches”. With git, we usually simply mention which version we import in commit messages. But then if people do local changes, it can be a bit difficult to track these and merge the changes correctly.

Lately with the availability of haikuports we are also trying to move some of these imported things to separate haikuports packages instead of importing them in Haiku, at least for the ones that are not strictly needed for the OS to run.

Thanks.
Do we have a list of items that should be moved to Haikports by chance?

Yes: https://dev.haiku-os.org/ticket/10267