func (s *CommitsService) GetCommitDiff(pid interface{}, sha string, options ...OptionFunc) ([]*Diff, *Response, error) {
	project, err := parseID(pid)
	if err != nil {
		return nil, nil, err
	}
	u := fmt.Sprintf("projects/%s/repository/commits/%s/diff", url.QueryEscape(project), sha)
	req, err := s.client.NewRequest("GET", u, nil, options)
	if err != nil {
		return nil, nil, err
	}
	var d []*Diff
	resp, err := s.client.Do(req, &d)
	if err != nil {
		return nil, resp, err
	}
	return d, resp, err
}
GetCommitDiff gets the diff of a commit in a project..

GitLab API docs:
https://docs.gitlab.com/ce/api/commits.html#get-the-diff-of-a-commit
package gitlab
import (
	"fmt"
	"net/url"
	"time"
)
type CommitsService struct {
	client *Client
}
type Commit struct {
	ID             string       `json:"id"`
	ShortID        string       `json:"short_id"`
	Title          string       `json:"title"`
	AuthorName     string       `json:"author_name"`
	AuthorEmail    string       `json:"author_email"`
	AuthoredDate   *time.Time   `json:"authored_date"`
	CommitterName  string       `json:"committer_name"`
	CommitterEmail string       `json:"committer_email"`
	CommittedDate  *time.Time   `json:"committed_date"`
	CreatedAt      *time.Time   `json:"created_at"`
	Message        string       `json:"message"`
	ParentIDs      []string     `json:"parent_ids"`
	Stats          *CommitStats `json:"stats"`
	Status         *BuildState  `json:"status"`
}
type CommitStats struct {
	Additions int `json:"additions"`
	Deletions int `json:"deletions"`
	Total     int `json:"total"`
}
func (c Commit) String() string {
	return Stringify(c)
}
type ListCommitsOptions struct {
	ListOptions
	RefName *string   `url:"ref_name,omitempty" json:"ref_name,omitempty"`
	Since   time.Time `url:"since,omitempty" json:"since,omitempty"`
	Until   time.Time `url:"until,omitempty" json:"until,omitempty"`
}
func (s *CommitsService) ListCommits(pid interface{}, opt *ListCommitsOptions, options ...OptionFunc) ([]*Commit, *Response, error) {
	project, err := parseID(pid)
	if err != nil {
		return nil, nil, err
	}
	u := fmt.Sprintf("projects/%s/repository/commits", url.QueryEscape(project))
	req, err := s.client.NewRequest("GET", u, opt, options)
	if err != nil {
		return nil, nil, err
	}
	var c []*Commit
	resp, err := s.client.Do(req, &c)
	if err != nil {
		return nil, resp, err
	}
	return c, resp, err
}
type FileAction string
const (
	FileCreate FileAction = "create"
	FileDelete FileAction = "delete"
	FileMove   FileAction = "move"
	FileUpdate FileAction = "update"
)
type CommitAction struct {
	Action       FileAction `url:"action" json:"action"`
	FilePath     string     `url:"file_path" json:"file_path"`
	PreviousPath string     `url:"previous_path,omitempty" json:"previous_path,omitempty"`
	Content      string     `url:"content,omitempty" json:"content,omitempty"`
	Encoding     string     `url:"encoding,omitempty" json:"encoding,omitempty"`
}
func (s *CommitsService) GetCommit(pid interface{}, sha string, options ...OptionFunc) (*Commit, *Response, error) {
	project, err := parseID(pid)
	if err != nil {
		return nil, nil, err
	}
	u := fmt.Sprintf("projects/%s/repository/commits/%s", url.QueryEscape(project), sha)
	req, err := s.client.NewRequest("GET", u, nil, options)
	if err != nil {
		return nil, nil, err
	}
	c := new(Commit)
	resp, err := s.client.Do(req, c)
	if err != nil {
		return nil, resp, err
	}
	return c, resp, err
}
type CreateCommitOptions struct {
	Branch        *string         `url:"branch" json:"branch"`
	CommitMessage *string         `url:"commit_message" json:"commit_message"`
	Actions       []*CommitAction `url:"actions" json:"actions"`
	AuthorEmail   *string         `url:"author_email,omitempty" json:"author_email,omitempty"`
	AuthorName    *string         `url:"author_name,omitempty" json:"author_name,omitempty"`
}
func (s *CommitsService) CreateCommit(pid interface{}, opt *CreateCommitOptions, options ...OptionFunc) (*Commit, *Response, error) {
	project, err := parseID(pid)
	if err != nil {
		return nil, nil, err
	}
	u := fmt.Sprintf("projects/%s/repository/commits", url.QueryEscape(project))
	req, err := s.client.NewRequest("POST", u, opt, options)
	if err != nil {
		return nil, nil, err
	}
	var c *Commit
	resp, err := s.client.Do(req, &c)
	if err != nil {
		return nil, resp, err
	}
	return c, resp, err
}
type Diff struct {
	Diff        string `json:"diff"`
	NewPath     string `json:"new_path"`
	OldPath     string `json:"old_path"`
	AMode       string `json:"a_mode"`
	BMode       string `json:"b_mode"`
	NewFile     bool   `json:"new_file"`
	RenamedFile bool   `json:"renamed_file"`
	DeletedFile bool   `json:"deleted_file"`
}
func (d Diff) String() string {
	return Stringify(d)
}