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 <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefano Lattarini committed Apr 12, 2013 at 00:36 UTC 41ccfdd9c931ee71b09f38f4eb19cf44a8e4381d
24 files changed +33 -33
builtin/apply.c
+3 -3
@@ -1921,7 +1921,7 @@ static int parse_binary(char *buffer, unsigned long size, struct patch *patch)
1921 }
1922
1923 /*
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
1925 * reading after seeing a single patch (i.e. changes to a single file).
1926 * Create fragments (i.e. patch hunks) and hang them to the given patch.
1927 * 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)
3025 *
3026 * The latter is needed to deal with a case where two paths A and B
3027 * 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
3029 * will remove it in a later patch.
3030 */
3031 #define PATH_TO_BE_DELETED ((struct patch *) -2)
@@ -3509,7 +3509,7 @@ static int check_patch(struct patch *patch)
3509 *
3510 * A patch to swap-rename between A and B would first rename A
3511 * 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
3513 * B; ask to_be_deleted() about the later rename. Removal of
3514 * B and rename from A to B is handled the same way by asking
3515 * was_deleted().
commit.c
+1 -1
@@ -834,7 +834,7 @@ struct commit_list *get_merge_bases(struct commit *one, struct commit *two,
834 }
835
836 /*
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?
838 */
839 int is_descendant_of(struct commit *commit, struct commit_list *with_commit)
840 {
commit.h
+1 -1
@@ -164,7 +164,7 @@ extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *r
164 extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos, int cleanup);
165 extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
166
167 -/* largest postive number a signed 32-bit integer can contain */
167 +/* largest positive number a signed 32-bit integer can contain */
168 #define INFINITE_DEPTH 0x7fffffff
169
170 extern int register_shallow(const unsigned char *sha1);
diff.c
+1 -1
@@ -1565,7 +1565,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
1565 * Binary files are displayed with "Bin XXX -> YYY bytes"
1566 * instead of the change count and graph. This part is treated
1567 * 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
1569 * guaranteed minimum width of the filename part and the
1570 * separators and this message, this message will "overflow"
1571 * making the line longer than the maximum width.
git-add--interactive.perl
+1 -1
@@ -1247,7 +1247,7 @@ sub summarize_hunk {
1247
1248
1249 # 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.
1251 sub display_hunks {
1252 my ($hunks, $i) = @_;
1253 my $ctr = 0;
git-cvsserver.perl
+2 -2
@@ -2911,7 +2911,7 @@ sub filenamesplit
2911 }
2912
2913 # 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
2915 # subdirectory (so the output is relative to top directory of the project).
2916 sub filecleanup
2917 {
@@ -4583,7 +4583,7 @@ sub getmeta
4583 # the numerical value of the corresponding byte plus
4584 # 100.
4585 # - "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
4587 # writes an import tool that tries to preserve original
4588 # CVS revision numbers, and the original CVS data had done
4589 # lots of branches off of branches and other strangeness to
git-quiltimport.sh
+1 -1
@@ -59,7 +59,7 @@ tmp_patch="$tmp_dir/patch"
59 tmp_info="$tmp_dir/info"
60
61
62 -# Find the intial commit
62 +# Find the initial commit
63 commit=$(git rev-parse HEAD)
64
65 mkdir $tmp_dir || exit 2
gitweb/gitweb.perl
+3 -3
@@ -683,7 +683,7 @@ sub evaluate_gitweb_config {
683 our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
684 our $GITWEB_CONFIG_COMMON = $ENV{'GITWEB_CONFIG_COMMON'} || "++GITWEB_CONFIG_COMMON++";
685
686 - # Protect agains duplications of file names, to not read config twice.
686 + # Protect against duplications of file names, to not read config twice.
687 # Only one of $GITWEB_CONFIG and $GITWEB_CONFIG_SYSTEM is used, so
688 # there possibility of duplication of filename there doesn't matter.
689 $GITWEB_CONFIG = "" if ($GITWEB_CONFIG eq $GITWEB_CONFIG_COMMON);
@@ -1136,7 +1136,7 @@ sub handle_errors_html {
1136
1137 # to avoid infinite loop where error occurs in die_error,
1138 # 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");
1140
1141 # you cannot jump out of die_error when called as error handler;
1142 # the subroutine set via CGI::Carp::set_message is called _after_
@@ -7485,7 +7485,7 @@ sub git_object {
7485 system(git_cmd(), "cat-file", '-e', $hash_base) == 0
7486 or die_error(404, "Base object does not exist");
7487
7488 - # here errors should not hapen
7488 + # here errors should not happen
7489 open my $fd, "-|", git_cmd(), "ls-tree", $hash_base, "--", $file_name
7490 or die_error(500, "Open git-ls-tree failed");
7491 my $line = <$fd>;
perl/Git.pm
+1 -1
@@ -1026,7 +1026,7 @@ my (%TEMP_FILEMAP, %TEMP_FILES);
1026
1027 =item temp_acquire ( NAME )
1028
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
1030 associated temp file has not been created this session or was closed, it is
1031 created, cached, and set for autoflush and binmode.
1032
perl/Git/I18N.pm
+1 -1
@@ -68,7 +68,7 @@ Git::I18N - Perl interface to Git's Gettext localizations
68
69 print __("Welcome to Git!\n");
70
71 - printf __("The following error occured: %s\n"), $error;
71 + printf __("The following error occurred: %s\n"), $error;
72
73 =head1 DESCRIPTION
74
perl/private-Error.pm
+1 -1
@@ -769,7 +769,7 @@ is a numeric value. These values are what will be returned by the
769 overload methods.
770
771 If the text value ends with C<at file line 1> as $@ strings do, then
772 -this infomation will be used to set the C<-file> and C<-line> arguments
772 +this information will be used to set the C<-file> and C<-line> arguments
773 of the error object.
774
775 This class is used internally if an eval'd block die's with an error
sequencer.c
+1 -1
@@ -133,7 +133,7 @@ static void print_advice(int show_hint, struct replay_opts *opts)
133 if (msg) {
134 fprintf(stderr, "%s\n", msg);
135 /*
136 - * A conflict has occured but the porcelain
136 + * A conflict has occurred but the porcelain
137 * (typically rebase --interactive) wants to take care
138 * of the commit itself so remove CHERRY_PICK_HEAD
139 */
t/t1006-cat-file.sh
+2 -2
@@ -116,9 +116,9 @@ tree_pretty_content="100644 blob $hello_sha1 hello"
116
117 run_tests 'tree' $tree_sha1 $tree_size "" "$tree_pretty_content"
118
119 -commit_message="Intial commit"
119 +commit_message="Initial commit"
120 commit_sha1=$(echo_without_newline "$commit_message" | git commit-tree $tree_sha1)
121 -commit_size=176
121 +commit_size=177
122 commit_content="tree $tree_sha1
123 author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> 0000000000 +0000
124 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 0000000000 +0000
t/t3701-add-interactive.sh
+1 -1
@@ -319,7 +319,7 @@ test_expect_success PERL 'split hunk "add -p (edit)"' '
319 # times to get out.
320 #
321 # 2. Correct version applies the (not)edited version, and asks
322 - # about the next hunk, against wich we say q and program
322 + # about the next hunk, against which we say q and program
323 # exits.
324 for a in s e q n q q
325 do
t/t4014-format-patch.sh
+3 -3
@@ -742,21 +742,21 @@ test_expect_success 'format-patch --signature --cover-letter' '
742 test 2 = $(grep "my sig" output | wc -l)
743 '
744
745 -test_expect_success 'format.signature="" supresses signatures' '
745 +test_expect_success 'format.signature="" suppresses signatures' '
746 git config format.signature "" &&
747 git format-patch --stdout -1 >output &&
748 check_patch output &&
749 ! grep "^-- \$" output
750 '
751
752 -test_expect_success 'format-patch --no-signature supresses signatures' '
752 +test_expect_success 'format-patch --no-signature suppresses signatures' '
753 git config --unset-all format.signature &&
754 git format-patch --stdout --no-signature -1 >output &&
755 check_patch output &&
756 ! grep "^-- \$" output
757 '
758
759 -test_expect_success 'format-patch --signature="" supresses signatures' '
759 +test_expect_success 'format-patch --signature="" suppresses signatures' '
760 git format-patch --stdout --signature="" -1 >output &&
761 check_patch output &&
762 ! grep "^-- \$" output
t/t4124-apply-ws-rule.sh
+1 -1
@@ -47,7 +47,7 @@ test_fix () {
47 # find touched lines
48 $DIFF file target | sed -n -e "s/^> //p" >fixed
49
50 - # the changed lines are all expeced to change
50 + # the changed lines are all expected to change
51 fixed_cnt=$(wc -l <fixed)
52 case "$1" in
53 '') expect_cnt=$fixed_cnt ;;
t/t6030-bisect-porcelain.sh
+1 -1
@@ -190,7 +190,7 @@ test_expect_success 'bisect start: no ".git/BISECT_START" if checkout error' '
190 # $HASH1 is good, $HASH4 is bad, we skip $HASH3
191 # but $HASH2 is bad,
192 # so we should find $HASH2 as the first bad commit
193 -test_expect_success 'bisect skip: successfull result' '
193 +test_expect_success 'bisect skip: successful result' '
194 git bisect reset &&
195 git bisect start $HASH4 $HASH1 &&
196 git bisect skip &&
t/t7601-merge-pull-config.sh
+1 -1
@@ -109,7 +109,7 @@ test_expect_success 'setup conflicted merge' '
109 '
110
111 # First do the merge with resolve and recursive then verify that
112 -# recusive is choosen.
112 +# recusive is chosen.
113
114 test_expect_success 'merge picks up the best result' '
115 git config --unset-all pull.twohead &&
t/t7610-mergetool.sh
+1 -1
@@ -237,7 +237,7 @@ test_expect_success 'mergetool takes partial path' '
237 git submodule update -N &&
238 test_must_fail git merge master &&
239
240 - #shouldnt need these lines
240 + #should not need these lines
241 #( yes "d" | git mergetool file11 >/dev/null 2>&1 ) &&
242 #( yes "d" | git mergetool file12 >/dev/null 2>&1 ) &&
243 #( yes "l" | git mergetool submod >/dev/null 2>&1 ) &&
t/t9001-send-email.sh
+2 -2
@@ -101,7 +101,7 @@ test_expect_success $PREREQ \
101
102 test_expect_success $PREREQ 'Send patches with --envelope-sender' '
103 clean_fake_sendmail &&
104 - git send-email --envelope-sender="Patch Contributer <patch@example.com>" --suppress-cc=sob --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
104 + git send-email --envelope-sender="Patch Contributor <patch@example.com>" --suppress-cc=sob --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
105 '
106
107 test_expect_success $PREREQ 'setup expect' '
@@ -787,7 +787,7 @@ test_expect_success $PREREQ 'confirm detects EOF (auto causes failure)' '
787 test $ret = "0"
788 '
789
790 -test_expect_success $PREREQ 'confirm doesnt loop forever' '
790 +test_expect_success $PREREQ 'confirm does not loop forever' '
791 CONFIRM=$(git config --get sendemail.confirm) &&
792 git config sendemail.confirm auto &&
793 GIT_SEND_EMAIL_NOTTY=1 &&
transport-helper.c
+1 -1
@@ -991,7 +991,7 @@ struct unidirectional_transfer {
991 int src_is_sock;
992 /* Is destination socket? */
993 int dest_is_sock;
994 - /* Transfer state (TRANSFERING/FLUSHING/FINISHED) */
994 + /* Transfer state (TRANSFERRING/FLUSHING/FINISHED) */
995 int state;
996 /* Buffer. */
997 char buf[BUFFERSIZE];
transport.h
+1 -1
@@ -74,7 +74,7 @@ struct transport {
74 const char *executable, int fd[2]);
75
76 /** get_refs_list(), fetch(), and push_refs() can keep
77 - * resources (such as a connection) reserved for futher
77 + * resources (such as a connection) reserved for further
78 * use. disconnect() releases these resources.
79 **/
80 int (*disconnect)(struct transport *connection);
xdiff/xdiffi.c
+1 -1
@@ -490,7 +490,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
490
491 /*
492 * Try to move back the possibly merged group of changes, to match
493 - * the recorded postion in the other file.
493 + * the recorded position in the other file.
494 */
495 while (ixref < ix) {
496 rchg[--ixs] = 1;
xdiff/xhistogram.c
+1 -1
@@ -55,7 +55,7 @@ struct histindex {
55 struct record {
56 unsigned int ptr, cnt;
57 struct record *next;
58 - } **records, /* an ocurrence */
58 + } **records, /* an occurrence */
59 **line_map; /* map of line to record chain */
60 chastore_t rcha;
61 unsigned int *next_ptrs;