Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10767

Git hooks do not work properly with git GUIs

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.10
    • Fix Version/s: 3.0.11-RC1
    • Component/s: None
    • Labels:
      None

      Description

      There are some issues with our git hooks and GUIs for git. Error messages are only shown when hooks return fatally which we do not do all the time for various reasons.

        Issue Links

          Activity

          Hide
          bantu Andreas Fischer added a comment -

          A solution could be a) detecting whether we are in git gui and making hooks fatal b) turning all hooks into fatal hooks. In case of b) great care has to be taken that commit messages are not lost.

          Show
          bantu Andreas Fischer added a comment - A solution could be a) detecting whether we are in git gui and making hooks fatal b) turning all hooks into fatal hooks. In case of b) great care has to be taken that commit messages are not lost.
          Hide
          brunoais brunoais added a comment -

          for a), I believe it's not possible. I asked the guys at stackoverflow and no one answered yet (it's there for 2 days now)
          For b) I have a solution that I don't know if is valid for phpbb's standards. It envolves using the file system to store the commit message before exitting with fail code.
          While running the prepare-commit-msg it would check if there is already a file with the previous commit message. If there is, use it. If there isn't use the current code.

          Show
          brunoais brunoais added a comment - for a), I believe it's not possible. I asked the guys at stackoverflow and no one answered yet (it's there for 2 days now) For b) I have a solution that I don't know if is valid for phpbb's standards. It envolves using the file system to store the commit message before exitting with fail code. While running the prepare-commit-msg it would check if there is already a file with the previous commit message. If there is, use it. If there isn't use the current code.
          Hide
          bantu Andreas Fischer added a comment -

          Or c) a simple on/off switch for turning all hooks into fatal hooks.

          To me this seems to be the best solution so far.

          Show
          bantu Andreas Fischer added a comment - Or c) a simple on/off switch for turning all hooks into fatal hooks. To me this seems to be the best solution so far.
          Hide
          brunoais brunoais added a comment -

          I'm ok with that one

          Show
          brunoais brunoais added a comment - I'm ok with that one
          Hide
          brunoais brunoais added a comment -

          How do we solve this? We make a configuration, right?
          If so, how should it be called?

          Show
          brunoais brunoais added a comment - How do we solve this? We make a configuration, right? If so, how should it be called?
          Hide
          Oleg Oleg [X] (Inactive) added a comment -

          Provided patch reinstates fatal knob in commit-msg hook. For pre-commit hook we can keep fatal behavior, with --no-verify being given to override it. The message produced by pre-commit hook before it dies should include instructions to use --no-verify.

          Show
          Oleg Oleg [X] (Inactive) added a comment - Provided patch reinstates fatal knob in commit-msg hook. For pre-commit hook we can keep fatal behavior, with --no-verify being given to override it. The message produced by pre-commit hook before it dies should include instructions to use --no-verify.

            People

            • Assignee:
              Oleg Oleg [X] (Inactive)
              Reporter:
              bantu Andreas Fischer
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development