Terminate option parsing in Git Commands prior to passing refspecs #3036

Closed
opened 2025-11-02 04:58:13 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @zeripath on GitHub (Mar 10, 2019).

Description

Throughout Gitea there are multiple places where there is use of git.NewCommand, or the like, where an argument is passed in to this command that could potentially be misinterpreted as an option. These should be protected through use of the "--" argument to terminate option parsing.

Originally created by @zeripath on GitHub (Mar 10, 2019). - Gitea version (or commit ref): master - Can you reproduce the bug at https://try.gitea.io: - [X] Yes (provide example URL) https://try.gitea.io/arandomer/test-perry123/commits/branch/--heads/testfile - [ ] No - [ ] Not relevant - Log gist: ## Description Throughout Gitea there are multiple places where there is use of `git.NewCommand`, or the like, where an argument is passed in to this command that could potentially be misinterpreted as an option. These should be protected through use of the `"--"` argument to terminate option parsing.
GiteaMirror added the type/enhancementissue/stale labels 2025-11-02 04:58:13 -06:00
Author
Owner

@stale[bot] commented on GitHub (May 11, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (May 11, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (May 25, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (May 25, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3036