mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	remove unnecessary parameter
This commit is contained in:
		@@ -61,7 +61,7 @@ func CompareDiff(ctx *context.APIContext) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	pathParam := ctx.PathParam("*")
 | 
						pathParam := ctx.PathParam("*")
 | 
				
			||||||
	baseRepo := ctx.Repo.Repository
 | 
						baseRepo := ctx.Repo.Repository
 | 
				
			||||||
	ci, err := common.ParseComparePathParams(ctx, pathParam, baseRepo, ctx.Repo.GitRepo, ctx.Doer)
 | 
						ci, err := common.ParseComparePathParams(ctx, pathParam, baseRepo, ctx.Repo.GitRepo)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		switch {
 | 
							switch {
 | 
				
			||||||
		case user_model.IsErrUserNotExist(err):
 | 
							case user_model.IsErrUserNotExist(err):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -402,7 +402,7 @@ func CreatePullRequest(ctx *context.APIContext) {
 | 
				
			|||||||
	)
 | 
						)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Get repo/branch information
 | 
						// Get repo/branch information
 | 
				
			||||||
	ci, err := common.ParseComparePathParams(ctx, form.Base+"..."+form.Head, repo, ctx.Repo.GitRepo, ctx.Doer)
 | 
						ci, err := common.ParseComparePathParams(ctx, form.Base+"..."+form.Head, repo, ctx.Repo.GitRepo)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		switch {
 | 
							switch {
 | 
				
			||||||
		case user_model.IsErrUserNotExist(err):
 | 
							case user_model.IsErrUserNotExist(err):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -231,7 +231,7 @@ func getRootRepo(ctx context.Context, repo *repo_model.Repository) (*repo_model.
 | 
				
			|||||||
// format: <base branch>...[<head repo>:]<head branch>
 | 
					// format: <base branch>...[<head repo>:]<head branch>
 | 
				
			||||||
// base<-head: master...head:feature
 | 
					// base<-head: master...head:feature
 | 
				
			||||||
// same repo: master...feature
 | 
					// same repo: master...feature
 | 
				
			||||||
func ParseComparePathParams(ctx context.Context, pathParam string, baseRepo *repo_model.Repository, baseGitRepo *git.Repository, doer *user_model.User) (*CompareInfo, error) {
 | 
					func ParseComparePathParams(ctx context.Context, pathParam string, baseRepo *repo_model.Repository, baseGitRepo *git.Repository) (*CompareInfo, error) {
 | 
				
			||||||
	ci := &CompareInfo{}
 | 
						ci := &CompareInfo{}
 | 
				
			||||||
	var err error
 | 
						var err error
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -194,7 +194,7 @@ func ParseCompareInfo(ctx *context.Context) *common.CompareInfo {
 | 
				
			|||||||
	pathParam := ctx.PathParam("*")
 | 
						pathParam := ctx.PathParam("*")
 | 
				
			||||||
	baseRepo := ctx.Repo.Repository
 | 
						baseRepo := ctx.Repo.Repository
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ci, err := common.ParseComparePathParams(ctx, pathParam, baseRepo, ctx.Repo.GitRepo, ctx.Doer)
 | 
						ci, err := common.ParseComparePathParams(ctx, pathParam, baseRepo, ctx.Repo.GitRepo)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		switch {
 | 
							switch {
 | 
				
			||||||
		case user_model.IsErrUserNotExist(err):
 | 
							case user_model.IsErrUserNotExist(err):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user