luci: go.chromium.org/luci/common/proto/git Index | Files

package git

import "go.chromium.org/luci/common/proto/git"

Package git contains Git-related protobuf definitions.

Index

Package Files

changetype.go commit.pb.go generate.go

Variables

var Commit_TreeDiff_ChangeType_name = map[int32]string{
    0:  "ADD",
    1:  "COPY",
    2:  "DELETE",
    3:  "MODIFY",
    4:  "RENAME",
}
var Commit_TreeDiff_ChangeType_value = map[string]int32{
    "ADD":    0,
    "COPY":   1,
    "DELETE": 2,
    "MODIFY": 3,
    "RENAME": 4,
}

type Commit Uses

type Commit struct {
    // The hex sha1 of the commit.
    Id  string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
    // The hex sha1 of the tree for this commit.
    Tree string `protobuf:"bytes,2,opt,name=tree" json:"tree,omitempty"`
    // The hex sha1's of each of this commits' parents.
    Parents   []string     `protobuf:"bytes,3,rep,name=parents" json:"parents,omitempty"`
    Author    *Commit_User `protobuf:"bytes,4,opt,name=author" json:"author,omitempty"`
    Committer *Commit_User `protobuf:"bytes,5,opt,name=committer" json:"committer,omitempty"`
    // This is the entire unaltered message body.
    Message              string             `protobuf:"bytes,6,opt,name=message" json:"message,omitempty"`
    TreeDiff             []*Commit_TreeDiff `protobuf:"bytes,7,rep,name=tree_diff,json=treeDiff" json:"tree_diff,omitempty"`
    XXX_NoUnkeyedLiteral struct{}           `json:"-"`
    XXX_unrecognized     []byte             `json:"-"`
    XXX_sizecache        int32              `json:"-"`
}

Commit is a single parsed commit as represented in a git log or git show expression.

func (*Commit) Descriptor Uses

func (*Commit) Descriptor() ([]byte, []int)

func (*Commit) GetAuthor Uses

func (m *Commit) GetAuthor() *Commit_User

func (*Commit) GetCommitter Uses

func (m *Commit) GetCommitter() *Commit_User

func (*Commit) GetId Uses

func (m *Commit) GetId() string

func (*Commit) GetMessage Uses

func (m *Commit) GetMessage() string

func (*Commit) GetParents Uses

func (m *Commit) GetParents() []string

func (*Commit) GetTree Uses

func (m *Commit) GetTree() string

func (*Commit) GetTreeDiff Uses

func (m *Commit) GetTreeDiff() []*Commit_TreeDiff

func (*Commit) ProtoMessage Uses

func (*Commit) ProtoMessage()

func (*Commit) Reset Uses

func (m *Commit) Reset()

func (*Commit) String Uses

func (m *Commit) String() string

func (*Commit) XXX_DiscardUnknown Uses

func (m *Commit) XXX_DiscardUnknown()

func (*Commit) XXX_Marshal Uses

func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Commit) XXX_Merge Uses

func (dst *Commit) XXX_Merge(src proto.Message)

func (*Commit) XXX_Size Uses

func (m *Commit) XXX_Size() int

func (*Commit) XXX_Unmarshal Uses

func (m *Commit) XXX_Unmarshal(b []byte) error

type Commit_TreeDiff Uses

type Commit_TreeDiff struct {
    // How this file changed.
    Type                 Commit_TreeDiff_ChangeType `protobuf:"varint,1,opt,name=type,enum=git.Commit_TreeDiff_ChangeType" json:"type,omitempty"`
    OldId                string                     `protobuf:"bytes,2,opt,name=old_id,json=oldId" json:"old_id,omitempty"`
    OldMode              uint32                     `protobuf:"varint,3,opt,name=old_mode,json=oldMode" json:"old_mode,omitempty"`
    OldPath              string                     `protobuf:"bytes,4,opt,name=old_path,json=oldPath" json:"old_path,omitempty"`
    NewId                string                     `protobuf:"bytes,5,opt,name=new_id,json=newId" json:"new_id,omitempty"`
    NewMode              uint32                     `protobuf:"varint,6,opt,name=new_mode,json=newMode" json:"new_mode,omitempty"`
    NewPath              string                     `protobuf:"bytes,7,opt,name=new_path,json=newPath" json:"new_path,omitempty"`
    XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
    XXX_unrecognized     []byte                     `json:"-"`
    XXX_sizecache        int32                      `json:"-"`
}

Each TreeDiff represents a single file that's changed between this commit and the "previous" commit, where "previous" depends on the context of how this Commit object was produced (i.e. the specific `git log` invocation, or similar command).

Note that these are an artifact of the `git log` expression, not of the commit itself (since git log has different ways that it could sort the commits in the log, and thus different ways it could calculate these diffs). In particular, you should avoid caching the TreeDiff data using only the Commit.id as the key.

The old_* fields correspond to the matching file in the previous commit (in the case of COPY/DELETE/MODIFY/RENAME), telling its blob hash, file mode and path name.

The new_* fields correspond to the matching file in this commit (in the case of ADD/COPY/MODIFY/RENAME), telling its blob hash, file mode and path name.

func (*Commit_TreeDiff) Descriptor Uses

func (*Commit_TreeDiff) Descriptor() ([]byte, []int)

func (*Commit_TreeDiff) GetNewId Uses

func (m *Commit_TreeDiff) GetNewId() string

func (*Commit_TreeDiff) GetNewMode Uses

func (m *Commit_TreeDiff) GetNewMode() uint32

func (*Commit_TreeDiff) GetNewPath Uses

func (m *Commit_TreeDiff) GetNewPath() string

func (*Commit_TreeDiff) GetOldId Uses

func (m *Commit_TreeDiff) GetOldId() string

func (*Commit_TreeDiff) GetOldMode Uses

func (m *Commit_TreeDiff) GetOldMode() uint32

func (*Commit_TreeDiff) GetOldPath Uses

func (m *Commit_TreeDiff) GetOldPath() string

func (*Commit_TreeDiff) GetType Uses

func (m *Commit_TreeDiff) GetType() Commit_TreeDiff_ChangeType

func (*Commit_TreeDiff) ProtoMessage Uses

func (*Commit_TreeDiff) ProtoMessage()

func (*Commit_TreeDiff) Reset Uses

func (m *Commit_TreeDiff) Reset()

func (*Commit_TreeDiff) String Uses

func (m *Commit_TreeDiff) String() string

func (*Commit_TreeDiff) XXX_DiscardUnknown Uses

func (m *Commit_TreeDiff) XXX_DiscardUnknown()

func (*Commit_TreeDiff) XXX_Marshal Uses

func (m *Commit_TreeDiff) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Commit_TreeDiff) XXX_Merge Uses

func (dst *Commit_TreeDiff) XXX_Merge(src proto.Message)

func (*Commit_TreeDiff) XXX_Size Uses

func (m *Commit_TreeDiff) XXX_Size() int

func (*Commit_TreeDiff) XXX_Unmarshal Uses

func (m *Commit_TreeDiff) XXX_Unmarshal(b []byte) error

type Commit_TreeDiff_ChangeType Uses

type Commit_TreeDiff_ChangeType int32
const (
    Commit_TreeDiff_ADD    Commit_TreeDiff_ChangeType = 0
    Commit_TreeDiff_COPY   Commit_TreeDiff_ChangeType = 1
    Commit_TreeDiff_DELETE Commit_TreeDiff_ChangeType = 2
    Commit_TreeDiff_MODIFY Commit_TreeDiff_ChangeType = 3
    Commit_TreeDiff_RENAME Commit_TreeDiff_ChangeType = 4
)

func (Commit_TreeDiff_ChangeType) EnumDescriptor Uses

func (Commit_TreeDiff_ChangeType) EnumDescriptor() ([]byte, []int)

func (*Commit_TreeDiff_ChangeType) MarshalJSON Uses

func (c *Commit_TreeDiff_ChangeType) MarshalJSON() ([]byte, error)

MarshalJSON returns a string representation of the change.

func (Commit_TreeDiff_ChangeType) String Uses

func (x Commit_TreeDiff_ChangeType) String() string

func (*Commit_TreeDiff_ChangeType) UnmarshalJSON Uses

func (c *Commit_TreeDiff_ChangeType) UnmarshalJSON(data []byte) error

UnmarshalJSON parses a string representation of the change.

type Commit_User Uses

type Commit_User struct {
    Name                 string               `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
    Email                string               `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"`
    Time                 *timestamp.Timestamp `protobuf:"bytes,3,opt,name=time" json:"time,omitempty"`
    XXX_NoUnkeyedLiteral struct{}             `json:"-"`
    XXX_unrecognized     []byte               `json:"-"`
    XXX_sizecache        int32                `json:"-"`
}

User represents the (name, email, timestamp) Commit header for author and/or commtter.

func (*Commit_User) Descriptor Uses

func (*Commit_User) Descriptor() ([]byte, []int)

func (*Commit_User) GetEmail Uses

func (m *Commit_User) GetEmail() string

func (*Commit_User) GetName Uses

func (m *Commit_User) GetName() string

func (*Commit_User) GetTime Uses

func (m *Commit_User) GetTime() *timestamp.Timestamp

func (*Commit_User) ProtoMessage Uses

func (*Commit_User) ProtoMessage()

func (*Commit_User) Reset Uses

func (m *Commit_User) Reset()

func (*Commit_User) String Uses

func (m *Commit_User) String() string

func (*Commit_User) XXX_DiscardUnknown Uses

func (m *Commit_User) XXX_DiscardUnknown()

func (*Commit_User) XXX_Marshal Uses

func (m *Commit_User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Commit_User) XXX_Merge Uses

func (dst *Commit_User) XXX_Merge(src proto.Message)

func (*Commit_User) XXX_Size Uses

func (m *Commit_User) XXX_Size() int

func (*Commit_User) XXX_Unmarshal Uses

func (m *Commit_User) XXX_Unmarshal(b []byte) error

Package git imports 6 packages (graph) and is imported by 20 packages. Updated 2018-08-14. Refresh now. Tools for package owners.