On 15/12/2022 15:54, Guido Günther wrote:
Or use `gbp clone --git-defuse-attributes=off ...` ?

Indeed! Thanks, I didn't notice this option, and I can confirm that it solves the issue (the exact option name is "--defuse-gitattributes=off" actually).

I took the time to look a bit at this option and where it comes from (seemingly, the goal is that gbp is compatible with other tools such as dgit). There's still something that strikes me.

IIUC, it's *only* "gbp clone" that will defuse the git attributes.

So developer A does "gbp import-orig", brings in the offending attributes: still they are not defused on their local copy. Then developer B does "gbp pull", and then no change: gbp does not defuse attributes during pull, so attributes are still enabled. Then developer C does "gbp clone", and they possibly get a different working copy, because in this case only, attributes are defused.

It seems that this behavior is prone to create problems, albeit it might be detected by CI (not sure what Salsa CI does in details), and it's also kind of a niche issue anyway.

We took a look at our packaging repos in Kali Linux (~ 600 repos), and we found 3 of them that are unclean on `gbp clone`. It's solved by setting --defuse-gitattributes. So we will probably add this argument to our .mrconfig, and make sure to use it all the time. We'll see where it gets us.

I'm really not familiar with git attributes, so I don't have any recommendation, or anything else to say, I'm merely reporting in case it helps.

Cheers,

Arnaud

Reply via email to