[GHC] #8251: Validate submodule references during pre-receive hook

GHC ghc-devs at haskell.org
Sun Mar 16 11:16:22 UTC 2014


#8251: Validate submodule references during pre-receive hook
-------------------------------------+------------------------------------
        Reporter:  hvr               |            Owner:  hvr
            Type:  task              |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Trac & Git        |          Version:  7.6.3
      Resolution:                    |         Keywords:  admin git
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by hvr):

 I've implemented a server-side hook and enabled it for `git-sandbox.git`
 and `ghc.git` The hacked-up implementation can be found in this
 [https://gist.github.com/hvr/9580927 gist]

 Some details:

  - only commits becoming reachable via non-`wip/`-branches ("persistent
 branches") are validated
  - if a non-merge commit results in a modified gitlink-type, or a merge
 commit results in a gitlink-type entry which is different from all its
 ancestors, then
    - the git commit message body must contain the string `submodule`
    - each touched gitlink is
      - looked up in the `.gitmodules` file and resolved to the respective
 git repo hosted `git.haskell.org`,
      - the referenced submodule commit must be reachable from a
 "persistent branch" (i.e. a non-`wip/`-branch)


 This scheme relies on "persistent branches" not being allowed to be
 deleted or non-fast-fwd updated.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8251#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list