mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	fix bug about can't skip commits base on base branch (#11555)
* fix bug about can't skip commits base on base branch Signed-off-by: a1012112796 <1012112796@qq.com> * Update modules/git/commit.go Co-authored-by: Lauris BH <lauris@nix.lv> * Update models/issue_comment.go Co-authored-by: Lauris BH <lauris@nix.lv> * fix lint Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		| @@ -482,6 +482,16 @@ func (c *Commit) GetBranchName() (string, error) { | ||||
| 	return strings.SplitN(strings.TrimSpace(data), "~", 2)[0], nil | ||||
| } | ||||
|  | ||||
| // LoadBranchName load branch name for commit | ||||
| func (c *Commit) LoadBranchName() (err error) { | ||||
| 	if len(c.Branch) != 0 { | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	c.Branch, err = c.GetBranchName() | ||||
| 	return | ||||
| } | ||||
|  | ||||
| // GetTagName gets the current tag name for given commit | ||||
| func (c *Commit) GetTagName() (string, error) { | ||||
| 	data, err := NewCommand("describe", "--exact-match", "--tags", "--always", c.ID.String()).RunInDir(c.repo.Path) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user