]> source.dussan.org Git - gitea.git/commit
Add git dashes separator to some "log" and "diff" commands (#23606)
authorwxiaoguang <wxiaoguang@gmail.com>
Sun, 26 Mar 2023 18:31:21 +0000 (02:31 +0800)
committerGitHub <noreply@github.com>
Sun, 26 Mar 2023 18:31:21 +0000 (19:31 +0100)
commit0df81b9e0d124894d6920a0f0419c13eb4ce9240
tree754fd751e11fed85c752fc99ef559d7bc29f0b8a
parentd5f9a4ef448f054285c40b6785ed1afe0d2b1854
Add git dashes separator to some "log" and "diff" commands (#23606)

Reference:
https://github.com/go-gitea/gitea/issues/22578#issuecomment-1444180053

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.
modules/git/repo_compare.go