Skip to content

Drop --end-of-options from git reset command#134

Merged
unknwon merged 2 commits intomasterfrom
jss/ntcu-fix-git-reset-command-error
Feb 18, 2026
Merged

Drop --end-of-options from git reset command#134
unknwon merged 2 commits intomasterfrom
jss/ntcu-fix-git-reset-command-error

Conversation

@jss-agent
Copy link
Collaborator

Summary

  • The git reset command does not support --end-of-options, which causes a fatal error when used with revision arguments like origin/master.
  • This removes --end-of-options from the Reset function and adds a test for the package-level Reset function.

Fixes gogs/gogs#8183

jss-agent and others added 2 commits February 18, 2026 17:54
The `git reset` command does not universally support the
`--end-of-options` flag across all Git versions, causing "fatal: option
'--end-of-options' must come before non-option arguments" errors (e.g.
on Git 2.39.5).

Since the revision argument is programmatically constructed (not
arbitrary user input), removing `--end-of-options` is safe and resolves
the compatibility issue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover both soft and hard reset modes to verify correct command
construction without --end-of-options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jss-agent jss-agent requested a review from a team as a code owner February 18, 2026 22:59
@unknwon unknwon merged commit bb4157e into master Feb 18, 2026
4 checks passed
@unknwon unknwon deleted the jss/ntcu-fix-git-reset-command-error branch February 18, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot upload / edit files via web interface after upgrading from GOGS 13 to 14.1

2 participants

Comments