1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-09 09:06:57 +02:00

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>
This commit is contained in:
Stefano Lattarini 2013-04-12 00:36:10 +02:00 committed by Junio C Hamano
parent 2fec81cbe5
commit 41ccfdd9c9
24 changed files with 33 additions and 33 deletions

View File

@ -1921,7 +1921,7 @@ static int parse_binary(char *buffer, unsigned long size, struct patch *patch)
} }
/* /*
* Read the patch text in "buffer" taht extends for "size" bytes; stop * Read the patch text in "buffer" that extends for "size" bytes; stop
* reading after seeing a single patch (i.e. changes to a single file). * reading after seeing a single patch (i.e. changes to a single file).
* Create fragments (i.e. patch hunks) and hang them to the given patch. * Create fragments (i.e. patch hunks) and hang them to the given patch.
* Return the number of bytes consumed, so that the caller can call us * 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)
* *
* The latter is needed to deal with a case where two paths A and B * The latter is needed to deal with a case where two paths A and B
* are swapped by first renaming A to B and then renaming B to A; * are swapped by first renaming A to B and then renaming B to A;
* moving A to B should not be prevented due to presense of B as we * moving A to B should not be prevented due to presence of B as we
* will remove it in a later patch. * will remove it in a later patch.
*/ */
#define PATH_TO_BE_DELETED ((struct patch *) -2) #define PATH_TO_BE_DELETED ((struct patch *) -2)
@ -3509,7 +3509,7 @@ static int check_patch(struct patch *patch)
* *
* A patch to swap-rename between A and B would first rename A * A patch to swap-rename between A and B would first rename A
* to B and then rename B to A. While applying the first one, * to B and then rename B to A. While applying the first one,
* the presense of B should not stop A from getting renamed to * the presence of B should not stop A from getting renamed to
* B; ask to_be_deleted() about the later rename. Removal of * B; ask to_be_deleted() about the later rename. Removal of
* B and rename from A to B is handled the same way by asking * B and rename from A to B is handled the same way by asking
* was_deleted(). * was_deleted().

View File

@ -834,7 +834,7 @@ struct commit_list *get_merge_bases(struct commit *one, struct commit *two,
} }
/* /*
* Is "commit" a decendant of one of the elements on the "with_commit" list? * Is "commit" a descendant of one of the elements on the "with_commit" list?
*/ */
int is_descendant_of(struct commit *commit, struct commit_list *with_commit) int is_descendant_of(struct commit *commit, struct commit_list *with_commit)
{ {

View File

@ -164,7 +164,7 @@ extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *r
extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos, int cleanup); extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos, int cleanup);
extern struct commit_list *get_octopus_merge_bases(struct commit_list *in); extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
/* largest postive number a signed 32-bit integer can contain */ /* largest positive number a signed 32-bit integer can contain */
#define INFINITE_DEPTH 0x7fffffff #define INFINITE_DEPTH 0x7fffffff
extern int register_shallow(const unsigned char *sha1); extern int register_shallow(const unsigned char *sha1);

2
diff.c
View File

@ -1565,7 +1565,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
* Binary files are displayed with "Bin XXX -> YYY bytes" * Binary files are displayed with "Bin XXX -> YYY bytes"
* instead of the change count and graph. This part is treated * instead of the change count and graph. This part is treated
* similarly to the graph part, except that it is not * similarly to the graph part, except that it is not
* "scaled". If total width is too small to accomodate the * "scaled". If total width is too small to accommodate the
* guaranteed minimum width of the filename part and the * guaranteed minimum width of the filename part and the
* separators and this message, this message will "overflow" * separators and this message, this message will "overflow"
* making the line longer than the maximum width. * making the line longer than the maximum width.

View File

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

View File

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

View File

@ -59,7 +59,7 @@ tmp_patch="$tmp_dir/patch"
tmp_info="$tmp_dir/info" tmp_info="$tmp_dir/info"
# Find the intial commit # Find the initial commit
commit=$(git rev-parse HEAD) commit=$(git rev-parse HEAD)
mkdir $tmp_dir || exit 2 mkdir $tmp_dir || exit 2

View File

@ -683,7 +683,7 @@ sub evaluate_gitweb_config {
our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++"; our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
our $GITWEB_CONFIG_COMMON = $ENV{'GITWEB_CONFIG_COMMON'} || "++GITWEB_CONFIG_COMMON++"; our $GITWEB_CONFIG_COMMON = $ENV{'GITWEB_CONFIG_COMMON'} || "++GITWEB_CONFIG_COMMON++";
# Protect agains duplications of file names, to not read config twice. # Protect against duplications of file names, to not read config twice.
# Only one of $GITWEB_CONFIG and $GITWEB_CONFIG_SYSTEM is used, so # Only one of $GITWEB_CONFIG and $GITWEB_CONFIG_SYSTEM is used, so
# there possibility of duplication of filename there doesn't matter. # there possibility of duplication of filename there doesn't matter.
$GITWEB_CONFIG = "" if ($GITWEB_CONFIG eq $GITWEB_CONFIG_COMMON); $GITWEB_CONFIG = "" if ($GITWEB_CONFIG eq $GITWEB_CONFIG_COMMON);
@ -1136,7 +1136,7 @@ sub handle_errors_html {
# to avoid infinite loop where error occurs in die_error, # to avoid infinite loop where error occurs in die_error,
# change handler to default handler, disabling handle_errors_html # change handler to default handler, disabling handle_errors_html
set_message("Error occured when inside die_error:\n$msg"); set_message("Error occurred when inside die_error:\n$msg");
# you cannot jump out of die_error when called as error handler; # you cannot jump out of die_error when called as error handler;
# the subroutine set via CGI::Carp::set_message is called _after_ # the subroutine set via CGI::Carp::set_message is called _after_
@ -7485,7 +7485,7 @@ sub git_object {
system(git_cmd(), "cat-file", '-e', $hash_base) == 0 system(git_cmd(), "cat-file", '-e', $hash_base) == 0
or die_error(404, "Base object does not exist"); or die_error(404, "Base object does not exist");
# here errors should not hapen # here errors should not happen
open my $fd, "-|", git_cmd(), "ls-tree", $hash_base, "--", $file_name open my $fd, "-|", git_cmd(), "ls-tree", $hash_base, "--", $file_name
or die_error(500, "Open git-ls-tree failed"); or die_error(500, "Open git-ls-tree failed");
my $line = <$fd>; my $line = <$fd>;

View File

@ -1026,7 +1026,7 @@ sub _close_cat_blob {
=item temp_acquire ( NAME ) =item temp_acquire ( NAME )
Attempts to retreive the temporary file mapped to the string C<NAME>. If an Attempts to retrieve the temporary file mapped to the string C<NAME>. If an
associated temp file has not been created this session or was closed, it is associated temp file has not been created this session or was closed, it is
created, cached, and set for autoflush and binmode. created, cached, and set for autoflush and binmode.

View File

@ -68,7 +68,7 @@ =head1 SYNOPSIS
print __("Welcome to Git!\n"); print __("Welcome to Git!\n");
printf __("The following error occured: %s\n"), $error; printf __("The following error occurred: %s\n"), $error;
=head1 DESCRIPTION =head1 DESCRIPTION

View File

@ -769,7 +769,7 @@ =head1 PRE-DEFINED ERROR CLASSES
overload methods. overload methods.
If the text value ends with C<at file line 1> as $@ strings do, then If the text value ends with C<at file line 1> as $@ strings do, then
this infomation will be used to set the C<-file> and C<-line> arguments this information will be used to set the C<-file> and C<-line> arguments
of the error object. of the error object.
This class is used internally if an eval'd block die's with an error This class is used internally if an eval'd block die's with an error

View File

@ -133,7 +133,7 @@ static void print_advice(int show_hint, struct replay_opts *opts)
if (msg) { if (msg) {
fprintf(stderr, "%s\n", msg); fprintf(stderr, "%s\n", msg);
/* /*
* A conflict has occured but the porcelain * A conflict has occurred but the porcelain
* (typically rebase --interactive) wants to take care * (typically rebase --interactive) wants to take care
* of the commit itself so remove CHERRY_PICK_HEAD * of the commit itself so remove CHERRY_PICK_HEAD
*/ */

View File

@ -116,9 +116,9 @@ tree_pretty_content="100644 blob $hello_sha1 hello"
run_tests 'tree' $tree_sha1 $tree_size "" "$tree_pretty_content" run_tests 'tree' $tree_sha1 $tree_size "" "$tree_pretty_content"
commit_message="Intial commit" commit_message="Initial commit"
commit_sha1=$(echo_without_newline "$commit_message" | git commit-tree $tree_sha1) commit_sha1=$(echo_without_newline "$commit_message" | git commit-tree $tree_sha1)
commit_size=176 commit_size=177
commit_content="tree $tree_sha1 commit_content="tree $tree_sha1
author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> 0000000000 +0000 author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> 0000000000 +0000
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 0000000000 +0000 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 0000000000 +0000

View File

@ -319,7 +319,7 @@ test_expect_success PERL 'split hunk "add -p (edit)"' '
# times to get out. # times to get out.
# #
# 2. Correct version applies the (not)edited version, and asks # 2. Correct version applies the (not)edited version, and asks
# about the next hunk, against wich we say q and program # about the next hunk, against which we say q and program
# exits. # exits.
for a in s e q n q q for a in s e q n q q
do do

View File

@ -742,21 +742,21 @@ test_expect_success 'format-patch --signature --cover-letter' '
test 2 = $(grep "my sig" output | wc -l) test 2 = $(grep "my sig" output | wc -l)
' '
test_expect_success 'format.signature="" supresses signatures' ' test_expect_success 'format.signature="" suppresses signatures' '
git config format.signature "" && git config format.signature "" &&
git format-patch --stdout -1 >output && git format-patch --stdout -1 >output &&
check_patch output && check_patch output &&
! grep "^-- \$" output ! grep "^-- \$" output
' '
test_expect_success 'format-patch --no-signature supresses signatures' ' test_expect_success 'format-patch --no-signature suppresses signatures' '
git config --unset-all format.signature && git config --unset-all format.signature &&
git format-patch --stdout --no-signature -1 >output && git format-patch --stdout --no-signature -1 >output &&
check_patch output && check_patch output &&
! grep "^-- \$" output ! grep "^-- \$" output
' '
test_expect_success 'format-patch --signature="" supresses signatures' ' test_expect_success 'format-patch --signature="" suppresses signatures' '
git format-patch --stdout --signature="" -1 >output && git format-patch --stdout --signature="" -1 >output &&
check_patch output && check_patch output &&
! grep "^-- \$" output ! grep "^-- \$" output

View File

@ -47,7 +47,7 @@ test_fix () {
# find touched lines # find touched lines
$DIFF file target | sed -n -e "s/^> //p" >fixed $DIFF file target | sed -n -e "s/^> //p" >fixed
# the changed lines are all expeced to change # the changed lines are all expected to change
fixed_cnt=$(wc -l <fixed) fixed_cnt=$(wc -l <fixed)
case "$1" in case "$1" in
'') expect_cnt=$fixed_cnt ;; '') expect_cnt=$fixed_cnt ;;

View File

@ -190,7 +190,7 @@ test_expect_success 'bisect start: no ".git/BISECT_START" if checkout error' '
# $HASH1 is good, $HASH4 is bad, we skip $HASH3 # $HASH1 is good, $HASH4 is bad, we skip $HASH3
# but $HASH2 is bad, # but $HASH2 is bad,
# so we should find $HASH2 as the first bad commit # so we should find $HASH2 as the first bad commit
test_expect_success 'bisect skip: successfull result' ' test_expect_success 'bisect skip: successful result' '
git bisect reset && git bisect reset &&
git bisect start $HASH4 $HASH1 && git bisect start $HASH4 $HASH1 &&
git bisect skip && git bisect skip &&

View File

@ -109,7 +109,7 @@ test_expect_success 'setup conflicted merge' '
' '
# First do the merge with resolve and recursive then verify that # First do the merge with resolve and recursive then verify that
# recusive is choosen. # recusive is chosen.
test_expect_success 'merge picks up the best result' ' test_expect_success 'merge picks up the best result' '
git config --unset-all pull.twohead && git config --unset-all pull.twohead &&

View File

@ -237,7 +237,7 @@ test_expect_success 'mergetool takes partial path' '
git submodule update -N && git submodule update -N &&
test_must_fail git merge master && test_must_fail git merge master &&
#shouldnt need these lines #should not need these lines
#( yes "d" | git mergetool file11 >/dev/null 2>&1 ) && #( yes "d" | git mergetool file11 >/dev/null 2>&1 ) &&
#( yes "d" | git mergetool file12 >/dev/null 2>&1 ) && #( yes "d" | git mergetool file12 >/dev/null 2>&1 ) &&
#( yes "l" | git mergetool submod >/dev/null 2>&1 ) && #( yes "l" | git mergetool submod >/dev/null 2>&1 ) &&

View File

@ -101,7 +101,7 @@ test_expect_success $PREREQ \
test_expect_success $PREREQ 'Send patches with --envelope-sender' ' test_expect_success $PREREQ 'Send patches with --envelope-sender' '
clean_fake_sendmail && clean_fake_sendmail &&
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 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
' '
test_expect_success $PREREQ 'setup expect' ' test_expect_success $PREREQ 'setup expect' '
@ -787,7 +787,7 @@ test_expect_success $PREREQ 'confirm detects EOF (auto causes failure)' '
test $ret = "0" test $ret = "0"
' '
test_expect_success $PREREQ 'confirm doesnt loop forever' ' test_expect_success $PREREQ 'confirm does not loop forever' '
CONFIRM=$(git config --get sendemail.confirm) && CONFIRM=$(git config --get sendemail.confirm) &&
git config sendemail.confirm auto && git config sendemail.confirm auto &&
GIT_SEND_EMAIL_NOTTY=1 && GIT_SEND_EMAIL_NOTTY=1 &&

View File

@ -991,7 +991,7 @@ struct unidirectional_transfer {
int src_is_sock; int src_is_sock;
/* Is destination socket? */ /* Is destination socket? */
int dest_is_sock; int dest_is_sock;
/* Transfer state (TRANSFERING/FLUSHING/FINISHED) */ /* Transfer state (TRANSFERRING/FLUSHING/FINISHED) */
int state; int state;
/* Buffer. */ /* Buffer. */
char buf[BUFFERSIZE]; char buf[BUFFERSIZE];

View File

@ -74,7 +74,7 @@ struct transport {
const char *executable, int fd[2]); const char *executable, int fd[2]);
/** get_refs_list(), fetch(), and push_refs() can keep /** get_refs_list(), fetch(), and push_refs() can keep
* resources (such as a connection) reserved for futher * resources (such as a connection) reserved for further
* use. disconnect() releases these resources. * use. disconnect() releases these resources.
**/ **/
int (*disconnect)(struct transport *connection); int (*disconnect)(struct transport *connection);

View File

@ -490,7 +490,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
/* /*
* Try to move back the possibly merged group of changes, to match * Try to move back the possibly merged group of changes, to match
* the recorded postion in the other file. * the recorded position in the other file.
*/ */
while (ixref < ix) { while (ixref < ix) {
rchg[--ixs] = 1; rchg[--ixs] = 1;

View File

@ -55,7 +55,7 @@ struct histindex {
struct record { struct record {
unsigned int ptr, cnt; unsigned int ptr, cnt;
struct record *next; struct record *next;
} **records, /* an ocurrence */ } **records, /* an occurrence */
**line_map; /* map of line to record chain */ **line_map; /* map of line to record chain */
chastore_t rcha; chastore_t rcha;
unsigned int *next_ptrs; unsigned int *next_ptrs;