When a commit to revision control requires a developer to change their own config

后端 未结 5 676
独厮守ぢ
独厮守ぢ 2020-12-10 17:30

What\'s the best method to notify other developers when a change committed into revision control requires some specific additional action by the developer getting the update

5条回答
  •  囚心锁ツ
    2020-12-10 17:40

    With git, what you could do (even if it isn't really there for that scenario) is to use a filter driver, provided your commit includes changes for a file with a recognizable content (the filter doesn't have a name or path of the file).

    enter image description here

    A filter driver is:

    • declared in a .gitattributes files (meaning, contrary to hooks or triggers, you can easily distribute it)
    • attached to a smudge and a clear script (also versioned, the smudge one being triggered on commit.
    • you can, on commit, triggers whatever automatic action you need.

    Again, the point is to not use hooks (which you can't easily replicated amongst repos), and use a mechanism which can be versioned and cloned around.

提交回复
热议问题