开发者

Force a version control not to break hard links when merging/pulling from another repo?

开发者 https://www.devze.com 2023-03-09 07:51 出处:网络
I have a project with some part of the code that are public and other that are not. I have the complete project versioned in my entreprise in folder E, and a specific folder P where I put the public

I have a project with some part of the code that are public and other that are not.

I have the complete project versioned in my entreprise in folder E, and a specific folder P where I put the public part. I thought it was a good idea to put hard-links in folder P of the public files in the folder E.

So that, the usual workflow should be to work on the enterprise versioned folder E, and once in a while go to folder P to commit the public files. (note that if I work 'alone', it works great)

The problem is that when I do some merging/pulling/rebasing of the files in folder E, it replaces the files -> thus changing their inode -> thus the files hard-linked in folder P do not get updated!

So my question is: is there a version control system which authorizes an option not 开发者_StackOverflow社区to change inode of files when merging/pulling/rebasing?

I work with git (or git-svn), but I would agree to switch for this convenient option.

Thanks

Louis

PS: I've seen this question (Git and hard links), but here I would like to take advantages of hard links to work more efficiently.


My suggestion is to use symlinks; they don't depend upon the inode, and I know they can be versioned in Subversion (and I would expect git). Versioning hardlinks would be very difficult, since it's plausible - albeit a very bad idea - that part of your working copy could cross filesystem boundaries.

0

精彩评论

暂无评论...
验证码 换一张
取 消