Skip to content

Commit 5b2cb82

Browse files
committed
Merge pull request #11 from sourcegraph/camelcase
changed protobuf field names to camel case
2 parents 9a14f20 + b1b22d8 commit 5b2cb82

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

diff/diff.pb.go

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

diff/diff.proto

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,65 +17,65 @@ option (gogoproto.sizer_all) = true;
1717
// +++ newname 2009-10-11 15:12:30.000000000 -0700
1818
message FileDiff {
1919
// the original name of the file
20-
string orig_name = 1;
20+
string OrigName = 1;
2121

2222
// the original timestamp (nil if not present)
23-
pbtypes.Timestamp orig_time = 2;
23+
pbtypes.Timestamp OrigTime = 2;
2424

2525
// the new name of the file (often same as OrigName)
26-
string new_name = 3;
26+
string NewName = 3;
2727

2828
// the new timestamp (nil if not present)
29-
pbtypes.Timestamp new_time = 4;
29+
pbtypes.Timestamp NewTime = 4;
3030

3131
// extended header lines (e.g., git's "new mode <mode>", "rename from <path>", etc.)
32-
repeated string extended = 5;
32+
repeated string Extended = 5;
3333

3434
// hunks that were changed from orig to new
35-
repeated Hunk hunks = 6;
35+
repeated Hunk Hunks = 6;
3636
}
3737

3838

3939
// A Hunk represents a series of changes (additions or deletions) in a file's
4040
// unified diff.
4141
message Hunk {
4242
// starting line number in original file
43-
int32 orig_start_line = 1;
43+
int32 OrigStartLine = 1;
4444

4545
// number of lines the hunk applies to in the original file
46-
int32 orig_lines = 2;
46+
int32 OrigLines = 2;
4747

4848
// if > 0, then the original file had a 'No newline at end of file' mark at this offset
49-
int32 orig_no_newline_at = 3;
49+
int32 OrigNoNewlineAt = 3;
5050

5151
// starting line number in new file
52-
int32 new_start_line = 4;
52+
int32 NewStartLine = 4;
5353

5454
// number of lines the hunk applies to in the new file
55-
int32 new_lines = 5;
55+
int32 NewLines = 5;
5656

5757
// optional section heading
58-
string section = 6;
58+
string Section = 6;
5959

6060
// 0-indexed line offset in unified file diff (including section headers); this is
6161
// only set when Hunks are read from entire file diff (i.e., when ReadAllHunks is
6262
// called) This accounts for hunk headers, too, so the StartPosition of the first
6363
// hunk will be 1.
64-
int32 start_position = 7;
64+
int32 StartPosition = 7;
6565

6666
// hunk body (lines prefixed with '-', '+', or ' ')
67-
bytes body = 8;
67+
bytes Body = 8;
6868
}
6969

7070
// A Stat is a diff stat that represents the number of lines added/changed/deleted.
7171
message Stat {
7272
// number of lines added
73-
int32 added = 1 [(gogoproto.jsontag) = ""];
73+
int32 Added = 1 [(gogoproto.jsontag) = ""];
7474

7575
// number of lines changed
76-
int32 changed = 2 [(gogoproto.jsontag) = ""];
76+
int32 Changed = 2 [(gogoproto.jsontag) = ""];
7777

7878
// number of lines deleted
79-
int32 deleted = 3 [(gogoproto.jsontag) = ""];
79+
int32 Deleted = 3 [(gogoproto.jsontag) = ""];
8080
}
8181

0 commit comments

Comments
 (0)