Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 381
    • Issues 381
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #2710
Closed
Open
Issue created Feb 25, 2016 by Douglas Thor@dougthor42

Allow start-commit hook to prevent the Commit dialog from showing.

Summary:

The start-commit hook does not prevent the Commit dialog from showing when the hook returns a non-zero exit code.

What steps will reproduce the problem?

  1. Create a start-commit hook batch file that returns an error code.

    • start-commit.bat:

      EXIT 1
  2. Add this to the hooks in TortoiseGit

    • Hook Type: Start Commit Hook
    • Command Line to Execute: C:\path\to\start-commit.bat
    • Wait for script to finish: True
    • Other items: doesn't matter
  3. Attempt to commit a change to a repo.

  4. See the error dialog as expected and press OK.

    image

  5. At this point, the TortoiseGit Commit dialog appears.

What is the expected output? What do you see instead?

On step 5, the commit dialog is displayed. I believe that it should not be displayed if the start-commit scripts returns a non-zero exit code.

What version of TortoiseGit and Git are you using? On what operating system?

  • git: 2.5.0.windows.1
  • TortoiseGit: 1.8.15.0
  • OS: Windows 7 Pro SP1
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking