Skip to content

500 Error on repository view page caused by --end-of-options #8215

@ilufang

Description

@ilufang

Gogs version

0.14.2

Git version

  • Server: 2.1.4
  • Client: N/A

Operating system

debian

Database

mysql

Describe the bug

Opening any repository on the web gives the following 500 error.

An error has occurred : exit status 129 - usage: git rev-list [OPTION] ... [ -- paths... ] limiting output: --max-count= --max-age= --min-age= --sparse --no-merges --min-parents= --no-min-parents --max-parents= --no-max-parents --remove-empty --all --branches --tags --remotes --stdin --quiet ordering output: --topo-order --date-order --reverse formatting output: --parents --children --objects | --objects-edge --unpacked --header | --pretty --abbrev= | --no-abbrev --abbrev-commit --left-right special purpose: --bisect --bisect-vars --bisect-all

With log:

2026/03/26 00:01:10 [ERROR] [...gogs/internal/route/repo/view.go:257 Home()] count commits: exit status 129 - usage: git rev-list [OPTION] ... [ -- paths... ]

So clearly in gogs/git-module/repo_commit.go:477 --end-of-options is used, which is a feature added in git 2.24.0. While gogs installation documentation claims support for git >= 1.8.3

To reproduce

With an old (but supposed supported) git executable on the server, open any repository on the web.

Expected behavior

Either features introduced after the minimally supported version are avoided or conditionally used;

Or the documentation and preferably the software itself carry a warning that the minimally-supported git version has been revised and caused an incompatibility.

Additional context

I agree that I should probably update my server thoroughly, but please understand the frustration of updating gogs only to find it broken. I was able to root-cause by going through code but that's not a pleasant experience as a user. With that said, git 2.24.0 released late-2019 is still relatively new for some long-running machines. As gogs has been advertised for its ease-of-use (and my reason for using it), I would (of course) hope that it be made compatible over raising requirements. Thanks.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    💊 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions