diff options
author | Will Chandler <wchandler@gitlab.com> | 2022-06-21 18:40:29 +0300 |
---|---|---|
committer | Will Chandler <wchandler@gitlab.com> | 2022-06-21 18:40:29 +0300 |
commit | c2b476bf52faf71cde1e6182a331887b2b0d2cf7 (patch) | |
tree | 7dfe32aaf2e4070a633c01189ea5667768dbda0f | |
parent | 4c37bb3678420b9c1422c438b387500b51ab0856 (diff) | |
parent | b882974cc78b44832db3e1dd5e48f473aa5714d7 (diff) |
Merge branch 'find-changed-paths-mode' into 'master'
FindChangedPaths: Add old_mode and new_mode fields
See merge request gitlab-org/gitaly!4592
-rw-r--r-- | internal/gitaly/service/diff/find_changed_paths.go | 17 | ||||
-rw-r--r-- | internal/gitaly/service/diff/find_changed_paths_test.go | 240 | ||||
-rw-r--r-- | proto/diff.proto | 10 | ||||
-rw-r--r-- | proto/go/gitalypb/diff.pb.go | 107 | ||||
-rw-r--r-- | ruby/proto/gitaly/diff_pb.rb | 2 |
5 files changed, 254 insertions, 122 deletions
diff --git a/internal/gitaly/service/diff/find_changed_paths.go b/internal/gitaly/service/diff/find_changed_paths.go index 743e9216f..93016168a 100644 --- a/internal/gitaly/service/diff/find_changed_paths.go +++ b/internal/gitaly/service/diff/find_changed_paths.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "io" + "strconv" "strings" "gitlab.com/gitlab-org/gitaly/v15/internal/git" @@ -116,6 +117,16 @@ func nextPath(reader *bufio.Reader) (*gitalypb.ChangedPaths, error) { return nil, fmt.Errorf("git diff-tree parsing failed on: %v", line) } + oldMode, err := strconv.ParseInt(string(split[0]), 8, 32) + if err != nil { + return nil, fmt.Errorf("parsing old mode: %w", err) + } + + newMode, err := strconv.ParseInt(string(split[1]), 8, 32) + if err != nil { + return nil, fmt.Errorf("parsing new mode: %w", err) + } + pathStatus := split[4] path, err := reader.ReadBytes(numStatDelimiter) @@ -137,8 +148,10 @@ func nextPath(reader *bufio.Reader) (*gitalypb.ChangedPaths, error) { } changedPath := &gitalypb.ChangedPaths{ - Status: parsedPath, - Path: path[:len(path)-1], + Status: parsedPath, + Path: path[:len(path)-1], + OldMode: int32(oldMode), + NewMode: int32(newMode), } return changedPath, nil diff --git a/internal/gitaly/service/diff/find_changed_paths_test.go b/internal/gitaly/service/diff/find_changed_paths_test.go index a4e899c9a..3873e2abf 100644 --- a/internal/gitaly/service/diff/find_changed_paths_test.go +++ b/internal/gitaly/service/diff/find_changed_paths_test.go @@ -27,44 +27,64 @@ func TestFindChangedPathsRequest_success(t *testing.T) { commits: []string{"e4003da16c1c2c3fc4567700121b17bf8e591c6c", "57290e673a4c87f51294f5216672cbc58d485d25", "8a0f2ee90d940bfb0ba1e14e8214b0649056e4ab", "d59c60028b053793cecfb4022de34602e1a9218e"}, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("CONTRIBUTING.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("CONTRIBUTING.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("MAINTENANCE.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("MAINTENANCE.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("gitaly/テスト.txt"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("gitaly/テスト.txt"), + OldMode: 0o000000, + NewMode: 0o100755, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("gitaly/deleted-file"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("gitaly/deleted-file"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("gitaly/file-with-multiple-chunks"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("gitaly/file-with-multiple-chunks"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("gitaly/mode-file"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("gitaly/mode-file"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("gitaly/mode-file-with-mods"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("gitaly/mode-file-with-mods"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("gitaly/named-file"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("gitaly/named-file"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("gitaly/named-file-with-mods"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("gitaly/named-file-with-mods"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_DELETED, - Path: []byte("files/js/commit.js.coffee"), + Status: gitalypb.ChangedPaths_DELETED, + Path: []byte("files/js/commit.js.coffee"), + OldMode: 0o100644, + NewMode: 0o000000, }, }, }, @@ -73,12 +93,16 @@ func TestFindChangedPathsRequest_success(t *testing.T) { commits: []string{"7975be0116940bf2ad4321f79d02a55c5f7779aa", "55bc176024cfa3baaceb71db584c7e5df900ea65"}, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("files/images/emoji.png"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("files/images/emoji.png"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte(".gitattributes"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte(".gitattributes"), + OldMode: 0o100644, + NewMode: 0o100644, }, }, }, @@ -95,8 +119,10 @@ func TestFindChangedPathsRequest_success(t *testing.T) { }, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("NEW_FILE.md"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("NEW_FILE.md"), + OldMode: 0o000000, + NewMode: 0o100644, }, }, }, @@ -116,16 +142,22 @@ func TestFindChangedPathsRequest_success(t *testing.T) { }, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_DELETED, - Path: []byte("CONTRIBUTING.md"), + Status: gitalypb.ChangedPaths_DELETED, + Path: []byte("CONTRIBUTING.md"), + OldMode: 0o100644, + NewMode: 0o000000, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("NEW_FILE.md"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("NEW_FILE.md"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("README.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("README.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, }, }, @@ -145,12 +177,16 @@ func TestFindChangedPathsRequest_success(t *testing.T) { }, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_DELETED, - Path: []byte("CHANGELOG"), + Status: gitalypb.ChangedPaths_DELETED, + Path: []byte("CHANGELOG"), + OldMode: 0o100644, + NewMode: 0o000000, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("CHANGELOG.md"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("CHANGELOG.md"), + OldMode: 0o000000, + NewMode: 0o100644, }, }, }, @@ -170,16 +206,22 @@ func TestFindChangedPathsRequest_success(t *testing.T) { }, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("CONTRIBUTING.md"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("CONTRIBUTING.md"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("NEW_FILE.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("NEW_FILE.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("README.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("README.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, }, }, @@ -197,12 +239,16 @@ func TestFindChangedPathsRequest_success(t *testing.T) { }, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("CONTRIBUTING.md"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("CONTRIBUTING.md"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("README.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("README.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, }, }, @@ -223,20 +269,28 @@ func TestFindChangedPathsRequest_success(t *testing.T) { }, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("NEW_FILE.md"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("NEW_FILE.md"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_DELETED, - Path: []byte("CONTRIBUTING.md"), + Status: gitalypb.ChangedPaths_DELETED, + Path: []byte("CONTRIBUTING.md"), + OldMode: 0o100644, + NewMode: 0o000000, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("NEW_FILE.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("NEW_FILE.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("README.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("README.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, }, }, @@ -273,36 +327,52 @@ func TestFindChangedPathsRequest_success(t *testing.T) { }, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("CONTRIBUTING.md"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("CONTRIBUTING.md"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("README.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("README.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("NEW_FILE.md"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("NEW_FILE.md"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_DELETED, - Path: []byte("CONTRIBUTING.md"), + Status: gitalypb.ChangedPaths_DELETED, + Path: []byte("CONTRIBUTING.md"), + OldMode: 0o100644, + NewMode: 0o000000, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("NEW_FILE.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("NEW_FILE.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("README.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("README.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("CONTRIBUTING.md"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("CONTRIBUTING.md"), + OldMode: 0o000000, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte("README.md"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte("README.md"), + OldMode: 0o100644, + NewMode: 0o100644, }, }, }, @@ -322,20 +392,28 @@ func TestFindChangedPathsRequest_success(t *testing.T) { }, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_DELETED, - Path: []byte(".DS_Store"), + Status: gitalypb.ChangedPaths_DELETED, + Path: []byte(".DS_Store"), + OldMode: 0o100644, + NewMode: 0o000000, }, { - Status: gitalypb.ChangedPaths_MODIFIED, - Path: []byte(".gitmodules"), + Status: gitalypb.ChangedPaths_MODIFIED, + Path: []byte(".gitmodules"), + OldMode: 0o100644, + NewMode: 0o100644, }, { - Status: gitalypb.ChangedPaths_DELETED, - Path: []byte("files/.DS_Store"), + Status: gitalypb.ChangedPaths_DELETED, + Path: []byte("files/.DS_Store"), + OldMode: 0o100644, + NewMode: 0o000000, }, { - Status: gitalypb.ChangedPaths_ADDED, - Path: []byte("gitlab-shell"), + Status: gitalypb.ChangedPaths_ADDED, + Path: []byte("gitlab-shell"), + OldMode: 0o000000, + NewMode: 0o160000, }, }, }, @@ -353,8 +431,10 @@ func TestFindChangedPathsRequest_success(t *testing.T) { }, expectedPaths: []*gitalypb.ChangedPaths{ { - Status: gitalypb.ChangedPaths_DELETED, - Path: []byte("README"), + Status: gitalypb.ChangedPaths_DELETED, + Path: []byte("README"), + OldMode: 0o100644, + NewMode: 0o000000, }, }, }, diff --git a/proto/diff.proto b/proto/diff.proto index 377cc7088..3247ceb57 100644 --- a/proto/diff.proto +++ b/proto/diff.proto @@ -301,4 +301,14 @@ message ChangedPaths { bytes path = 1; // This comment is left unintentionally blank. Status status = 2; + // old_mode is the mode of the changed path previous to the change. May be one of the following values: + // + // - 0o000000 if the path does not exist. + // - 0o100644 if the path refers to a normal file. + // - 0o100755 if the path refers to an executable file. + // - 0o040000 if the path refers to a tree entry. + // - 0o160000 if the path refers to a submodule. + int32 old_mode = 3; + // new_mode is the mode of the changed path after the change. Please refer to `old_mode` for a list of potential values. + int32 new_mode = 4; } diff --git a/proto/go/gitalypb/diff.pb.go b/proto/go/gitalypb/diff.pb.go index e6f0f6eec..03b122eb4 100644 --- a/proto/go/gitalypb/diff.pb.go +++ b/proto/go/gitalypb/diff.pb.go @@ -1234,6 +1234,16 @@ type ChangedPaths struct { Path []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // This comment is left unintentionally blank. Status ChangedPaths_Status `protobuf:"varint,2,opt,name=status,proto3,enum=gitaly.ChangedPaths_Status" json:"status,omitempty"` + // old_mode is the mode of the changed path previous to the change. May be one of the following values: + // + // - 0o000000 if the path does not exist. + // - 0o100644 if the path refers to a normal file. + // - 0o100755 if the path refers to an executable file. + // - 0o040000 if the path refers to a tree entry. + // - 0o160000 if the path refers to a submodule. + OldMode int32 `protobuf:"varint,3,opt,name=old_mode,json=oldMode,proto3" json:"old_mode,omitempty"` + // new_mode is the mode of the changed path after the change. Please refer to `old_mode` for a list of potential values. + NewMode int32 `protobuf:"varint,4,opt,name=new_mode,json=newMode,proto3" json:"new_mode,omitempty"` } func (x *ChangedPaths) Reset() { @@ -1282,6 +1292,20 @@ func (x *ChangedPaths) GetStatus() ChangedPaths_Status { return ChangedPaths_ADDED } +func (x *ChangedPaths) GetOldMode() int32 { + if x != nil { + return x.OldMode + } + return 0 +} + +func (x *ChangedPaths) GetNewMode() int32 { + if x != nil { + return x.NewMode + } + return 0 +} + // Request is a single request to pass to git diff-tree. type FindChangedPathsRequest_Request struct { state protoimpl.MessageState @@ -1672,52 +1696,55 @@ var file_diff_proto_rawDesc = []byte{ 0x61, 0x74, 0x68, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, - 0x73, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x61, + 0x73, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0x4b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, - 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x4f, 0x44, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, - 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, - 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x50, 0x49, 0x45, 0x44, 0x10, 0x04, 0x32, - 0xea, 0x03, 0x0a, 0x0b, 0x44, 0x69, 0x66, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x4d, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x69, 0x66, 0x66, 0x12, 0x19, 0x2e, - 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x69, 0x66, - 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, - 0x79, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, 0x12, 0x50, - 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x1a, 0x2e, - 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x6c, - 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x61, - 0x6c, 0x79, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, - 0x12, 0x44, 0x0a, 0x07, 0x52, 0x61, 0x77, 0x44, 0x69, 0x66, 0x66, 0x12, 0x16, 0x2e, 0x67, 0x69, - 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x61, 0x77, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x61, 0x77, - 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, - 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, 0x12, 0x47, 0x0a, 0x08, 0x52, 0x61, 0x77, 0x50, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x61, 0x77, 0x50, - 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x69, - 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, 0x12, - 0x4a, 0x0a, 0x09, 0x44, 0x69, 0x66, 0x66, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x67, + 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x6e, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x4b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x50, + 0x49, 0x45, 0x44, 0x10, 0x04, 0x32, 0xea, 0x03, 0x0a, 0x0b, 0x44, 0x69, 0x66, 0x66, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, + 0x69, 0x66, 0x66, 0x12, 0x19, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x69, + 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, + 0x08, 0x02, 0x30, 0x01, 0x12, 0x50, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, 0x65, + 0x6c, 0x74, 0x61, 0x12, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x44, + 0x65, 0x6c, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, + 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, 0x12, 0x44, 0x0a, 0x07, 0x52, 0x61, 0x77, 0x44, 0x69, 0x66, + 0x66, 0x12, 0x16, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x61, 0x77, 0x44, 0x69, + 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x61, + 0x6c, 0x79, 0x2e, 0x52, 0x61, 0x77, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, 0x12, 0x47, 0x0a, 0x08, + 0x52, 0x61, 0x77, 0x50, 0x61, 0x74, 0x63, 0x68, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, + 0x79, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, + 0x02, 0x08, 0x02, 0x30, 0x01, 0x12, 0x4a, 0x0a, 0x09, 0x44, 0x69, 0x66, 0x66, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x44, 0x69, 0x66, 0x66, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, - 0x44, 0x69, 0x66, 0x66, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, 0x12, 0x5f, 0x0a, 0x10, 0x46, - 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, - 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, 0x42, 0x34, 0x5a, 0x32, - 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, - 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x35, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, + 0x01, 0x12, 0x5f, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, + 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, + 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, + 0x30, 0x01, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, + 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, + 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/ruby/proto/gitaly/diff_pb.rb b/ruby/proto/gitaly/diff_pb.rb index 980aa94e8..5018218b5 100644 --- a/ruby/proto/gitaly/diff_pb.rb +++ b/ruby/proto/gitaly/diff_pb.rb @@ -114,6 +114,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "gitaly.ChangedPaths" do optional :path, :bytes, 1 optional :status, :enum, 2, "gitaly.ChangedPaths.Status" + optional :old_mode, :int32, 3 + optional :new_mode, :int32, 4 end add_enum "gitaly.ChangedPaths.Status" do value :ADDED, 0 |