Skip to content

Commit 6e86531

Browse files
jss-spectorclaude
andcommitted
Drop --end-of-options from git reset command
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>
1 parent 0300f96 commit 6e86531

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ func Reset(repoPath, rev string, opts ...ResetOptions) error {
348348
cmd.AddArgs("--hard")
349349
}
350350

351-
_, err := cmd.AddOptions(opt.CommandOptions).AddArgs("--end-of-options", rev).RunInDir(repoPath)
351+
_, err := cmd.AddOptions(opt.CommandOptions).AddArgs(rev).RunInDir(repoPath)
352352
return err
353353
}
354354

0 commit comments

Comments
 (0)