Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
b973eddd
Unverified
Commit
b973eddd
authored
Jul 22, 2019
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: deduplicate same authors with different casing
parent
1a83114c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
AUTHORS
AUTHORS
+0
-2
update-license.go
build/update-license.go
+14
-9
No files found.
AUTHORS
View file @
b973eddd
...
@@ -122,7 +122,6 @@ Gus <yo@soygus.com>
...
@@ -122,7 +122,6 @@ Gus <yo@soygus.com>
Gustav Simonsson <gustav.simonsson@gmail.com>
Gustav Simonsson <gustav.simonsson@gmail.com>
Gísli Kristjánsson <gislik@hamstur.is>
Gísli Kristjánsson <gislik@hamstur.is>
Ha ĐANG <dvietha@gmail.com>
Ha ĐANG <dvietha@gmail.com>
hackyminer <hackyminer@gmail.com>
HackyMiner <hackyminer@gmail.com>
HackyMiner <hackyminer@gmail.com>
hadv <dvietha@gmail.com>
hadv <dvietha@gmail.com>
Hao Bryan Cheng <haobcheng@gmail.com>
Hao Bryan Cheng <haobcheng@gmail.com>
...
@@ -257,7 +256,6 @@ Paul Litvak <litvakpol@012.net.il>
...
@@ -257,7 +256,6 @@ Paul Litvak <litvakpol@012.net.il>
Paulo L F Casaretto <pcasaretto@gmail.com>
Paulo L F Casaretto <pcasaretto@gmail.com>
Paweł Bylica <chfast@gmail.com>
Paweł Bylica <chfast@gmail.com>
Pedro Pombeiro <PombeirP@users.noreply.github.com>
Pedro Pombeiro <PombeirP@users.noreply.github.com>
Pedro Pombeiro <pombeirp@users.noreply.github.com>
Peter Broadhurst <peter@themumbles.net>
Peter Broadhurst <peter@themumbles.net>
Peter Pratscher <pratscher@gmail.com>
Peter Pratscher <pratscher@gmail.com>
Petr Mikusek <petr@mikusek.info>
Petr Mikusek <petr@mikusek.info>
...
...
build/update-license.go
View file @
b973eddd
...
@@ -275,27 +275,32 @@ func mailmapLookup(authors []string) []string {
...
@@ -275,27 +275,32 @@ func mailmapLookup(authors []string) []string {
}
}
func
writeAuthors
(
files
[]
string
)
{
func
writeAuthors
(
files
[]
string
)
{
merge
:=
make
(
map
[
string
]
bool
)
var
(
dedup
=
make
(
map
[
string
]
bool
)
list
[]
string
)
// Add authors that Git reports as contributors.
// Add authors that Git reports as contributors.
// This is the primary source of author information.
// This is the primary source of author information.
for
_
,
a
:=
range
gitAuthors
(
files
)
{
for
_
,
a
:=
range
gitAuthors
(
files
)
{
merge
[
a
]
=
true
if
la
:=
strings
.
ToLower
(
a
);
!
dedup
[
la
]
{
list
=
append
(
list
,
a
)
dedup
[
la
]
=
true
}
}
}
// Add existing authors from the file. This should ensure that we
// Add existing authors from the file. This should ensure that we
// never lose authors, even if Git stops listing them. We can also
// never lose authors, even if Git stops listing them. We can also
// add authors manually this way.
// add authors manually this way.
for
_
,
a
:=
range
readAuthors
()
{
for
_
,
a
:=
range
readAuthors
()
{
merge
[
a
]
=
true
if
la
:=
strings
.
ToLower
(
a
);
!
dedup
[
la
]
{
list
=
append
(
list
,
a
)
dedup
[
la
]
=
true
}
}
// Write sorted list of authors back to the file.
var
result
[]
string
for
a
:=
range
merge
{
result
=
append
(
result
,
a
)
}
}
sort
.
Sort
(
authors
(
result
))
// Write sorted list of authors back to the file.
sort
.
Sort
(
authors
(
list
))
content
:=
new
(
bytes
.
Buffer
)
content
:=
new
(
bytes
.
Buffer
)
content
.
WriteString
(
authorsFileHeader
)
content
.
WriteString
(
authorsFileHeader
)
for
_
,
a
:=
range
resul
t
{
for
_
,
a
:=
range
lis
t
{
content
.
WriteString
(
a
)
content
.
WriteString
(
a
)
content
.
WriteString
(
"
\n
"
)
content
.
WriteString
(
"
\n
"
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment