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/feed | |
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/feed')
-rw-r--r-- | routers/web/feed/branch.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/feed/branch.go b/routers/web/feed/branch.go index 22b6e2f14b..f13038ff9b 100644 --- a/routers/web/feed/branch.go +++ b/routers/web/feed/branch.go @@ -16,7 +16,7 @@ import ( // ShowBranchFeed shows tags and/or releases on the repo as RSS / Atom feed func ShowBranchFeed(ctx *context.Context, repo *repo.Repository, formatType string) { - commits, err := ctx.Repo.Commit.CommitsByRange(0, 10) + commits, err := ctx.Repo.Commit.CommitsByRange(0, 10, "") if err != nil { ctx.ServerError("ShowBranchFeed", err) return |