diff options
author | Matthew Walowski <mattwalowski@gmail.com> | 2023-04-29 05:34:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 08:34:14 -0400 |
commit | f766b002938b5c81e343c81fda3c0669fa09809f (patch) | |
tree | d0d5baa5d120b81c18721b7de2f46d2b855f6b0f /routers/web/repo/commit.go | |
parent | 241b74f6c536c1d7de3b4e79e552bf1a3264cc6d (diff) | |
download | gitea-f766b002938b5c81e343c81fda3c0669fa09809f.tar.gz gitea-f766b002938b5c81e343c81fda3c0669fa09809f.zip |
Add ability to specify '--not' from GetAllCommits (#24409)
For my specific use case, I'd like to get all commits that are on one
branch but NOT on the other branch.
For instance, I'd like to get all the commits on `Branch1` that are not
also on `master` (I.e. all commits that were made after `Branch1` was
created).
This PR adds a `not` query param that gets passed down to the `git log`
command to allow the user to exclude items from `GetAllCommits`.
See [git
documentation](https://git-scm.com/docs/git-log#Documentation/git-log.txt---not)
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'routers/web/repo/commit.go')
-rw-r--r-- | routers/web/repo/commit.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/commit.go b/routers/web/repo/commit.go index 7439c2411b..93294f8ddd 100644 --- a/routers/web/repo/commit.go +++ b/routers/web/repo/commit.go @@ -70,7 +70,7 @@ func Commits(ctx *context.Context) { } // Both `git log branchName` and `git log commitId` work. - commits, err := ctx.Repo.Commit.CommitsByRange(page, pageSize) + commits, err := ctx.Repo.Commit.CommitsByRange(page, pageSize, "") if err != nil { ctx.ServerError("CommitsByRange", err) return |