Closed jaklinger closed 3 years ago
I'd argue that solving a simple merge conflict is less hassle than the following situation:
@jooh see Alex's comment (we were discussing this)
Yeah, those are fair points @bishax, in which case a git hook (post commit?) would actually be a better option since it would keep the committer in the loop, and "manually" triggering it would simply be a case of triggering an empty commit.
On further research it it seems a better way to handle this is with a merge driver, which basically would ensure that conflicts for this specific file are always resolved with --ours
.
Is there any scenario in which you don't want to resolve merges in this way automatically? Would you ever need to commit to the repo without changing VERSION
?
If anything, we would want to take that option out of the developers hands all together so the merge driver sounds like the perfect solution, and very very lightweight
(and for that specific file it should only ever be ours
since the intention of the version is to match the code version to feature branch in question)
I have a prototype for this now. It should be implemented as a PR on ojd_daps
right?
Both here and there actually, thanks!
After every merge to
dev
all other active PRs end up with a conflictedVERSION
(between the feature head anddev
). To resolve this we can implement an action which:dev
dev
sh
package to wrap upgit
git pull && git merge dev
(or the pythonsh
equivalent)VERSION
, picking the head overdev
, then commit the change and pushdev