openETCS / toolchain

WP7: Top Level Project for the toolchain
26 stars 30 forks source link

Prevent automatic merge of .reqif and uml files in git #329

Closed jastram closed 10 years ago

jastram commented 10 years ago

@astante suggested, as a temporary solution to prevent corruption due to merging, to block this. He is not sure, but there may be a .gitattributes file that does this.

I suggest to ask Lukasz to do this, but I cannot assign this (not yet part of project?). Thus, for the time being, I assign this to @cecilebraun - can you please make sure someone is assigned and does this? This should not take longer than an hour or so.

astante commented 10 years ago

Can you please provide a list of files that shouldn't be automatically merged? I think they file extensions are .reqif, .uml, .di, .notation. Have I missed something?

jastram commented 10 years ago

As far as ProR is concerned, just .reqif. As far as UML is concerned, @MatthieuPERIN can provide this answer.

astante commented 10 years ago

I added the *.reqif into .gitattributes in f39293aca43d79eaa41caa2fa24316dac1a98456 The proposed changes for the payrus files were already in the .gitattributes file. Probably the commit has to be merged to other branches, but I don't know how for what other purposes the other branches are used.

MatthieuPERIN commented 10 years ago

I will also add .docx and .pdf to the .gitattribute to prevent this documents to be merged as well if nobody opposes.

jastram commented 10 years ago

We need to move forward on this. I just sent this email:

Dear Lukasz,

We filed an issue for you, but couldn't assign it to you yet:

https://github.com/openETCS/toolchain/issues/329

@Project Office: Can you please ensure that Lukasz has the required permissions? This means that we need to assign him in the toolchain repository, and it means that he must become committer to the model repository.

Thanks,

lfronc commented 10 years ago

What we can do is to add a .gitattributes file at the root of the repository, in this file we can tell git that we have binary files and that they should not be merged, for example:

*.reqif binary
*.reqif merge=binary

The consequence is that if you try to push your changes and there is a conflict (two different versions of the binary in two different commits), you will have to make a pull, then add and commit the right file to resolve the conflict before pushing it.

If it is ok, I can do it and push the repo.

cecilebraun commented 10 years ago

Temporary solution

MatthieuPERIN commented 10 years ago

Not temporary I fear as merging XML file format using git (and so gitlab) is a common and long term issue impacting not only our project.