Skip to content

Commit d656600

Browse files
demerphqroot
authored andcommitted
updateAUTHORS.pm - use _file suffix for methods that read/update files
Exactly what "update_authors" does is a little less clear than what "update_authors_file" does.
1 parent 4563a79 commit d656600

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Porting/updateAUTHORS.pm

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ sub read_commit_log {
111111
return $author_info;
112112
}
113113

114-
sub read_authors {
114+
sub read_authors_file {
115115
my ($self)= @_;
116116
my $authors_file= $self->{authors_file};
117117

@@ -168,7 +168,7 @@ sub read_authors {
168168
return (\%author_info, \@authors_preamble, $raw_text);
169169
}
170170

171-
sub update_authors {
171+
sub update_authors_file {
172172
my ($self)= @_;
173173

174174
my $author_info= $self->{author_info};
@@ -217,7 +217,7 @@ sub update_authors {
217217
}
218218
}
219219

220-
sub read_mailmap {
220+
sub read_mailmap_file {
221221
my ($self)= @_;
222222
my $mailmap_file= $self->{mailmap_file};
223223

@@ -280,7 +280,7 @@ sub __sorted_hash_keys {
280280
}
281281

282282
# Returns 0 if the file needed to be changed, Return 1 if it does not.
283-
sub update_mailmap {
283+
sub update_mailmap_file {
284284
my ($self)= @_;
285285
my $mailmap_hash= $self->{new_mailmap_hash};
286286
my $mailmap_preamble= $self->{mailmap_preamble};
@@ -537,29 +537,29 @@ sub read_and_update {
537537
%{$self}{qw(authors_file mailmap_file)};
538538

539539
# read the authors file and extract the info it contains
540-
$self->read_authors();
540+
$self->read_authors_file();
541541

542542
# read the mailmap file.
543-
$self->read_mailmap();
543+
$self->read_mailmap_file();
544544

545545
# check and possibly fix the mailmap data, and build a set of precomputed
546546
# datasets to work with it.
547547
$self->check_fix_mailmap_hash();
548548

549549
# update the mailmap based on any check or fixes we just did.
550-
$self->update_mailmap();
550+
$self->update_mailmap_file();
551551

552552
# read the commits names using git log, and compares and checks
553553
# them against the data we have in authors.
554554
$self->read_commit_log();
555555

556556
# update the authors file with any changes
557-
$self->update_authors();
557+
$self->update_authors_file();
558558

559559
# check if we discovered new email data from the commits that
560560
# we need to write back to disk.
561561
$self->add_new_mailmap_entries()
562-
and $self->update_mailmap();
562+
and $self->update_mailmap_file();
563563

564564
return $self->changed_count();
565565
}
@@ -682,13 +682,13 @@ any new names it contains.
682682
683683
Normally used via C<read_and_update> and not called directly.
684684
685-
=item read_authors()
685+
=item read_authors_file()
686686
687687
Read the AUTHORS file into the object, and return data about it.
688688
689689
Normally used via C<read_and_update> and not called directly.
690690
691-
=item read_mailmap()
691+
=item read_mailmap_file()
692692
693693
Read the .mailmap file into the object and return data about it.
694694
@@ -700,14 +700,14 @@ Read the exclusion file into the object and return data about it.
700700
701701
Normally used via C<read_and_update> and not called directly.
702702
703-
=item update_authors()
703+
=item update_authors_file()
704704
705705
Write out an updated AUTHORS file atomically if it has changed,
706706
returns 0 if the file was actually updated, 1 if it was not.
707707
708708
Normally used via C<read_and_update> and not called directly.
709709
710-
=item update_mailmap()
710+
=item update_mailmap_file()
711711
712712
Write out an updated .mailmap file atomically if it has changed,
713713
returns 0 if the file was actually updated, 1 if it was not.

0 commit comments

Comments
 (0)