Add git dashes separator to some "log" and "diff" commands#23606
Conversation
|
Hmm, sorry for that I misread a message, wait for the author first. |
|
I don't mind at all that you created the PR! You even added comments, so that's always good. |
|
Thank you very much. Then I would re-open this PR.
I guess In history, we ever removed some "really redundant" dashes, like #22756, remove the dashes , at that time, the removal was correct ( So I think if we need to add dashes to git command, we could make them more explicit to help future developers. |
zeripath
left a comment
There was a problem hiding this comment.
Are there other places where these -- have been removed in the recent refactorings?
…23606) Reference: go-gitea#22578 (comment) Credits to @tdesveaux , thank you very much for catching the problem. If you'd like to open a PR, feel free to replace this one. Git reports fatal errors for ambiguous arguments: ``` fatal: ambiguous argument 'refs/a...refs/b': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' ``` So the `--` separator is necessary in some cases.
No, the only one is that This PR related old code was the same as before. I didn't change logic during refactoring.
|
|
OK, double confirmed, not a regression. The code was that long ago: See the old GetCompareInfo and GetDiffNumChangedFiles |
* upstream/main: (23 commits) Fix project card preview select and template select (go-gitea#23684) [skip ci] Updated translations via Crowdin Add git dashes separator to some "log" and "diff" commands (go-gitea#23606) Add Simplified Chinese translate for oauth2-provider (go-gitea#23713) Fix incorrect `toggle` buttons (go-gitea#23676) Fine tune more downdrop settings, use SVG for labels, improve Repo Topic Edit form (go-gitea#23626) Allow new file and edit file preview if it has editable extension (go-gitea#23624) [skip ci] Updated translations via Crowdin Clean some legacy files and move some build files (go-gitea#23699) Remove row clicking from notification table (go-gitea#22695) Describe Gitea's purpose more accurately (go-gitea#23698) [skip ci] Updated translations via Crowdin ensure go/bin path exists when copying hugo bin into it (go-gitea#23692) Create commit status when event is `pull_request_sync` (go-gitea#23683) Add `deps-docs` command to makefile (go-gitea#23686) Fix incorrect package doc link (go-gitea#23679) Improve indices for `action` table (go-gitea#23532) Clarify that Gitea requires JavaScript (go-gitea#23677) Use data-tooltip-content for tippy tooltip (go-gitea#23649) Add aria attributes to interactive time tooltips. (go-gitea#23661) ...
…23720) Backport #23606 by @wxiaoguang Reference: #22578 (comment) Credits to @tdesveaux , thank you very much for catching the problem. If you'd like to open a PR, feel free to replace this one. Git reports fatal errors for ambiguous arguments: ``` fatal: ambiguous argument 'refs/a...refs/b': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' ``` So the `--` separator is necessary in some cases. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Reference: #22578 (comment)
Credits to @tdesveaux , thank you very much for catching the problem. If you'd like to open a PR, feel free to replace this one.
Git reports fatal errors for ambiguous arguments:
So the
--separator is necessary in some cases.