Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
gstreamer
gstreamer
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 403
    • Issues 403
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 78
    • Merge Requests 78
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GStreamer
  • gstreamergstreamer
  • Issues
  • #627

Closed
Open
Opened Oct 31, 2020 by Chris White@cxw42Contributor

pre-commit.hook: -v: unexpected operator

Environment:

  • At commit f6ce1686 (master)
  • OS: Lubuntu 20.04, Linux 5.3.0-64-generic #58-Ubuntu SMP Fri Jul 10 19:33:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • /bin/sh: provided by dash 0.5.10.2-6 amd64

Steps:

  • Check out master
  • Build per the instructions (this copies hooks/pre-commit.hook to .git/hooks/pre-commit)
  • git commit --amend --allow-empty --no-edit

Expected:

  • Normal git-commit output

Observed:

  • Error message -v: unexpected operator

Console log:

~/proj/gstreamer$ git commit --amend --allow-empty --no-edit 
--Checking style--
--Checking style pass--
.git/hooks/pre-commit: 93: [: -v: unexpected operator
[issue624 c0ed16b8c] gstinfo WIP
 Date: Sat Oct 31 12:52:55 2020 -0400
 1 file changed, 3 insertions(+), 3 deletions(-)

Analysis:

The pre-commit hook uses #!/bin/sh. On Debian, /bin/sh is dash, and dash does not suport bash-specific features. -v is such a feature, so is not recognized by dash or by test(1).

Thanks for considering this report!

Edited Oct 31, 2020 by Chris White
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: gstreamer/gstreamer#627