Skip to content

Commit 41ccfdd

Browse files
slattarinigitster
authored andcommitted
Correct common spelling mistakes in comments and tests
Most of these were found using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Acked-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2fec81c commit 41ccfdd

24 files changed

+33
-33
lines changed

builtin/apply.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,7 +1921,7 @@ static int parse_binary(char *buffer, unsigned long size, struct patch *patch)
19211921
}
19221922

19231923
/*
1924-
* Read the patch text in "buffer" taht extends for "size" bytes; stop
1924+
* Read the patch text in "buffer" that extends for "size" bytes; stop
19251925
* reading after seeing a single patch (i.e. changes to a single file).
19261926
* Create fragments (i.e. patch hunks) and hang them to the given patch.
19271927
* Return the number of bytes consumed, so that the caller can call us
@@ -3025,7 +3025,7 @@ static struct patch *in_fn_table(const char *name)
30253025
*
30263026
* The latter is needed to deal with a case where two paths A and B
30273027
* are swapped by first renaming A to B and then renaming B to A;
3028-
* moving A to B should not be prevented due to presense of B as we
3028+
* moving A to B should not be prevented due to presence of B as we
30293029
* will remove it in a later patch.
30303030
*/
30313031
#define PATH_TO_BE_DELETED ((struct patch *) -2)
@@ -3509,7 +3509,7 @@ static int check_patch(struct patch *patch)
35093509
*
35103510
* A patch to swap-rename between A and B would first rename A
35113511
* to B and then rename B to A. While applying the first one,
3512-
* the presense of B should not stop A from getting renamed to
3512+
* the presence of B should not stop A from getting renamed to
35133513
* B; ask to_be_deleted() about the later rename. Removal of
35143514
* B and rename from A to B is handled the same way by asking
35153515
* was_deleted().

commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ struct commit_list *get_merge_bases(struct commit *one, struct commit *two,
834834
}
835835

836836
/*
837-
* Is "commit" a decendant of one of the elements on the "with_commit" list?
837+
* Is "commit" a descendant of one of the elements on the "with_commit" list?
838838
*/
839839
int is_descendant_of(struct commit *commit, struct commit_list *with_commit)
840840
{

commit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *r
164164
extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos, int cleanup);
165165
extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
166166

167-
/* largest postive number a signed 32-bit integer can contain */
167+
/* largest positive number a signed 32-bit integer can contain */
168168
#define INFINITE_DEPTH 0x7fffffff
169169

170170
extern int register_shallow(const unsigned char *sha1);

diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1565,7 +1565,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
15651565
* Binary files are displayed with "Bin XXX -> YYY bytes"
15661566
* instead of the change count and graph. This part is treated
15671567
* similarly to the graph part, except that it is not
1568-
* "scaled". If total width is too small to accomodate the
1568+
* "scaled". If total width is too small to accommodate the
15691569
* guaranteed minimum width of the filename part and the
15701570
* separators and this message, this message will "overflow"
15711571
* making the line longer than the maximum width.

git-add--interactive.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ sub summarize_hunk {
12471247

12481248

12491249
# Print a one-line summary of each hunk in the array ref in
1250-
# the first argument, starting wih the index in the 2nd.
1250+
# the first argument, starting with the index in the 2nd.
12511251
sub display_hunks {
12521252
my ($hunks, $i) = @_;
12531253
my $ctr = 0;

git-cvsserver.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2911,7 +2911,7 @@ sub filenamesplit
29112911
}
29122912

29132913
# Cleanup various junk in filename (try to canonicalize it), and
2914-
# add prependdir to accomodate running CVS client from a
2914+
# add prependdir to accommodate running CVS client from a
29152915
# subdirectory (so the output is relative to top directory of the project).
29162916
sub filecleanup
29172917
{
@@ -4583,7 +4583,7 @@ sub getmeta
45834583
# the numerical value of the corresponding byte plus
45844584
# 100.
45854585
# - "plus 100" avoids "0"s, and also reduces the
4586-
# likelyhood of a collision in the case that someone someday
4586+
# likelihood of a collision in the case that someone someday
45874587
# writes an import tool that tries to preserve original
45884588
# CVS revision numbers, and the original CVS data had done
45894589
# lots of branches off of branches and other strangeness to

git-quiltimport.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ tmp_patch="$tmp_dir/patch"
5959
tmp_info="$tmp_dir/info"
6060

6161

62-
# Find the intial commit
62+
# Find the initial commit
6363
commit=$(git rev-parse HEAD)
6464

6565
mkdir $tmp_dir || exit 2

gitweb/gitweb.perl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ sub evaluate_gitweb_config {
683683
our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
684684
our $GITWEB_CONFIG_COMMON = $ENV{'GITWEB_CONFIG_COMMON'} || "++GITWEB_CONFIG_COMMON++";
685685

686-
# Protect agains duplications of file names, to not read config twice.
686+
# Protect against duplications of file names, to not read config twice.
687687
# Only one of $GITWEB_CONFIG and $GITWEB_CONFIG_SYSTEM is used, so
688688
# there possibility of duplication of filename there doesn't matter.
689689
$GITWEB_CONFIG = "" if ($GITWEB_CONFIG eq $GITWEB_CONFIG_COMMON);
@@ -1136,7 +1136,7 @@ sub handle_errors_html {
11361136

11371137
# to avoid infinite loop where error occurs in die_error,
11381138
# change handler to default handler, disabling handle_errors_html
1139-
set_message("Error occured when inside die_error:\n$msg");
1139+
set_message("Error occurred when inside die_error:\n$msg");
11401140

11411141
# you cannot jump out of die_error when called as error handler;
11421142
# the subroutine set via CGI::Carp::set_message is called _after_
@@ -7485,7 +7485,7 @@ sub git_object {
74857485
system(git_cmd(), "cat-file", '-e', $hash_base) == 0
74867486
or die_error(404, "Base object does not exist");
74877487

7488-
# here errors should not hapen
7488+
# here errors should not happen
74897489
open my $fd, "-|", git_cmd(), "ls-tree", $hash_base, "--", $file_name
74907490
or die_error(500, "Open git-ls-tree failed");
74917491
my $line = <$fd>;

perl/Git.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ my (%TEMP_FILEMAP, %TEMP_FILES);
10261026

10271027
=item temp_acquire ( NAME )
10281028
1029-
Attempts to retreive the temporary file mapped to the string C<NAME>. If an
1029+
Attempts to retrieve the temporary file mapped to the string C<NAME>. If an
10301030
associated temp file has not been created this session or was closed, it is
10311031
created, cached, and set for autoflush and binmode.
10321032

perl/Git/I18N.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Git::I18N - Perl interface to Git's Gettext localizations
6868
6969
print __("Welcome to Git!\n");
7070
71-
printf __("The following error occured: %s\n"), $error;
71+
printf __("The following error occurred: %s\n"), $error;
7272
7373
=head1 DESCRIPTION
7474

0 commit comments

Comments
 (0)