Fix spelling mistakes
PATCH 1/1 Fix spelling mistakes
--- builtin/apply.c | 2 +- builtin/clean.c | 2 +- config.c | 2 +- contrib/examples/git-am.sh | 2 +- contrib/hooks/multimail/README | 2 +- contrib/subtree/t/t7900-subtree.sh | 2 +- diff.c | 2 +- dir.c | 2 +- git-p4.py | 2 +- refs.h | 2 +- sha1-lookup.c | 2 +- t/t5535-fetch-push-symref.sh | 2 +- t/t6030-bisect-porcelain.sh | 2 +- worktree.c | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-)
builtin/apply.c +1 -1
@@ -3980,7 +3980,7 @@ static void show_rename_copy(struct patch *p) old = slash_old +1 ; new = slash_new +1 ; } -/* p->old_name thru old is the common prefix, and old and new +/* p->old_name through old is the common prefix, and old and new * through the end of names are renames */ if (old != p->old_name)
builtin/clean.c +1 -1
@@ -192,7 +192,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,strbuf_setlen (path, len);strbuf_addstr (path, e->d_name);if (lstat (path->buf, &st)) - ;/* fall thru */ + ;/* fall through */ else if (S_ISDIR (st.st_mode)) {if (remove_dirs (path, prefix, force_flag, dry_run, quiet, &gone)) ret =1 ;
config.c +1 -1
@@ -1278,7 +1278,7 @@ static void git_config_raw(config_fn_t fn, void *data)* something went really wrong and we should stop * immediately. */ -die (_ ("unknown error occured while reading the configuration files" )); +die (_ ("unknown error occurred while reading the configuration files" )); }static void configset_iter (struct config_set *cs,config_fn_t fn,void *data)
contrib/examples/git-am.sh +1 -1
@@ -542,7 +542,7 @@ then rm -f "$dotest/dirtyindex" else # Possible stray $dotest directory in the independent-run - # case; in the --rebasing case, it is upto the caller + # case; in the --rebasing case, it is up to the caller # (git-rebase--am) to take care of stray directories. if test -d "$dotest" && test -z "$rebasing" then
contrib/hooks/multimail/README +1 -1
@@ -489,7 +489,7 @@ multimailhook.commitLogOpts multimailhook.dateSubstitute String to use as a substitute for ``Date:`` in the output of ``git - log`` while formatting commit messages. This is usefull to avoid + log`` while formatting commit messages. This is useful to avoid emitting a line that can be interpreted by mailers as the start of a cited message (Zimbra webmail in particular). Defaults to ``CommitDate: ``. Set to an empty string or ``none`` to deactivate
contrib/subtree/t/t7900-subtree.sh +1 -1
@@ -932,7 +932,7 @@ test_expect_success 'split a new subtree without --onto option' ' # also test that we still can split out an entirely new subtree # if the parent of the first commit in the tree is not empty, - # then the new subtree has accidently been attached to something + # then the new subtree has accidentally been attached to something git subtree split --prefix="sub dir2" --branch subproj2-br && check_equal "$(git log --pretty=format:%P -1 subproj2-br)" "" )
diff.c +1 -1
@@ -2084,7 +2084,7 @@ static int is_conflict_marker(const char *line, int marker_size, unsigned long lfor (cnt =1 ; cnt < marker_size; cnt++)if (line[cnt] != firstchar)return 0 ; -/* line[1] thru line[marker_size-1] are same as firstchar */ +/* line[1] through line[marker_size-1] are same as firstchar */ if (len < marker_size +1 || !isspace (line[marker_size]))return 0 ;return 1 ;
dir.c +1 -1
@@ -2166,7 +2166,7 @@ static int remove_dir_recurse(struct strbuf *path, int flag, int *kept_up)* wanted anyway */ continue ; -/* fall thru */ +/* fall through */ }else if (S_ISDIR (st.st_mode)) {if (!remove_dir_recurse (path, flag, &kept_down))continue ;/* happy */
git-p4.py +1 -1
@@ -1918,7 +1918,7 @@ def run(self, args): if self.useClientSpec: self.clientSpecDirs = getClientSpec() - # Check for the existance of P4 branches + # Check for the existence of P4 branches branchesDetected = (len(p4BranchesInGit().keys()) > 1) if self.useClientSpec and not branchesDetected:
refs.h +1 -1
@@ -336,7 +336,7 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err);* msg -- a message describing the change (for the reflog). * * err -- a strbuf for receiving a description of any error that -* might have occured. +* might have occurred. * * The functions make internal copies of refname and msg, so the * caller retains ownership of these parameters.
sha1-lookup.c +1 -1
@@ -199,7 +199,7 @@ int sha1_entry_pos(const void *table,break ; ofs_0 = ofs;/* -* byte 0 thru (ofs-1) are the same between +* byte 0 through (ofs-1) are the same between * lo and hi; ofs is the first byte that is * different. *
t/t5535-fetch-push-symref.sh +1 -1
@@ -1,6 +1,6 @@ #!/bin/sh -test_description='avoiding conflicting update thru symref aliasing' +test_description='avoiding conflicting update through symref aliasing' . ./test-lib.sh
t/t6030-bisect-porcelain.sh +1 -1
@@ -721,7 +721,7 @@ git bisect good 3de952f2416b6084f557ec417709eac740c6818c # first bad commit: [32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>. EOF -test_expect_success 'bisect log: successfull result' ' +test_expect_success 'bisect log: successful result' ' git bisect reset && git bisect start $HASH4 $HASH2 && git bisect good &&
worktree.c +1 -1
@@ -18,7 +18,7 @@ void free_worktrees(struct worktree **worktrees)/* * read 'path_to_ref' into 'ref'. Also if is_detached is not NULL, -* set is_detached to 1 (0) if the ref is detatched (is not detached). +* set is_detached to 1 (0) if the ref is detached (is not detached). * * $GIT_COMMON_DIR/$symref (e.g. HEAD) is practically outside $GIT_DIR so * for linked worktrees, `resolve_ref_unsafe()` won't work (it uses
Signature · 1 line
2.8.0
Quoted 2 lines · Eric Engestrom
Signed-off-by Eric Engestrom <[email protected]>---
While I think "through" is not wrong, I do not think it is worth the patch churn to do s/thru/through/;
If the original author wants to spell the word "thru", we are in no position to say it must be spelled "through" [*1*]. It's a bit different from correcting a non-word "usefull" to "useful". The only "Huh?" I saw around "thru" in this patch was that these said "fall thru" while I am fairly sure there are many places that say "fallthru", which is fairly common way to say that word in comments.
Other changes looked all sensible.
Thanks for going through the codebase with a fine-toothed comb.
[Footnote]
*1* http://www.merriam-webster.com/words-at-play/how-thru-turned-into-through
and http://grammarist.com/spelling/through-thru/ were amusing reads.
Quoted 197 lines
builtin/apply.c | 2 +- builtin/clean.c | 2 +- config.c | 2 +- contrib/examples/git-am.sh | 2 +- contrib/hooks/multimail/README | 2 +- contrib/subtree/t/t7900-subtree.sh | 2 +- diff.c | 2 +- dir.c | 2 +- git-p4.py | 2 +- refs.h | 2 +- sha1-lookup.c | 2 +- t/t5535-fetch-push-symref.sh | 2 +- t/t6030-bisect-porcelain.sh | 2 +- worktree.c | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-)builtin/apply.c +1
-1@@ -3980,7 +3980,7 @@ static void show_rename_copy(struct patch *p) old = slash_old +1 ; new = slash_new +1 ; } -/* p->old_name thru old is the common prefix, and old and new +/* p->old_name through old is the common prefix, and old and new * through the end of names are renames */ if (old != p->old_name)builtin/clean.c +1
-1@@ -192,7 +192,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,strbuf_setlen (path, len);strbuf_addstr (path, e->d_name);if (lstat (path->buf, &st)) - ;/* fall thru */ + ;/* fall through */ else if (S_ISDIR (st.st_mode)) {if (remove_dirs (path, prefix, force_flag, dry_run, quiet, &gone)) ret =1 ;config.c +1
-1@@ -1278,7 +1278,7 @@ static void git_config_raw(config_fn_t fn, void *data)* something went really wrong and we should stop * immediately. */ -die (_ ("unknown error occured while reading the configuration files" )); +die (_ ("unknown error occurred while reading the configuration files" )); }static void configset_iter (struct config_set *cs,config_fn_t fn,void *data)contrib/examples/git-am.sh +1
-1@@ -542,7 +542,7 @@ then rm -f "$dotest/dirtyindex" else # Possible stray $dotest directory in the independent-run - # case; in the --rebasing case, it is upto the caller + # case; in the --rebasing case, it is up to the caller # (git-rebase--am) to take care of stray directories. if test -d "$dotest" && test -z "$rebasing" thencontrib/hooks/multimail/README +1
-1@@ -489,7 +489,7 @@ multimailhook.commitLogOpts multimailhook.dateSubstitute String to use as a substitute for ``Date:`` in the output of ``git - log`` while formatting commit messages. This is usefull to avoid + log`` while formatting commit messages. This is useful to avoid emitting a line that can be interpreted by mailers as the start of a cited message (Zimbra webmail in particular). Defaults to ``CommitDate: ``. Set to an empty string or ``none`` to deactivatecontrib/subtree/t/t7900-subtree.sh +1
-1@@ -932,7 +932,7 @@ test_expect_success 'split a new subtree without --onto option' ' # also test that we still can split out an entirely new subtree # if the parent of the first commit in the tree is not empty, - # then the new subtree has accidently been attached to something + # then the new subtree has accidentally been attached to something git subtree split --prefix="sub dir2" --branch subproj2-br && check_equal "$(git log --pretty=format:%P -1 subproj2-br)" "" )diff.c +1
-1@@ -2084,7 +2084,7 @@ static int is_conflict_marker(const char *line, int marker_size, unsigned long lfor (cnt =1 ; cnt < marker_size; cnt++)if (line[cnt] != firstchar)return 0 ; -/* line[1] thru line[marker_size-1] are same as firstchar */ +/* line[1] through line[marker_size-1] are same as firstchar */ if (len < marker_size +1 || !isspace (line[marker_size]))return 0 ;return 1 ;dir.c +1
-1@@ -2166,7 +2166,7 @@ static int remove_dir_recurse(struct strbuf *path, int flag, int *kept_up)* wanted anyway */ continue ; -/* fall thru */ +/* fall through */ }else if (S_ISDIR (st.st_mode)) {if (!remove_dir_recurse (path, flag, &kept_down))continue ;/* happy */ git-p4.py +1
-1@@ -1918,7 +1918,7 @@ def run(self, args): if self.useClientSpec: self.clientSpecDirs = getClientSpec() - # Check for the existance of P4 branches + # Check for the existence of P4 branches branchesDetected = (len(p4BranchesInGit().keys()) > 1) if self.useClientSpec and not branchesDetected:refs.h +1
-1@@ -336,7 +336,7 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err);* msg -- a message describing the change (for the reflog). * * err -- a strbuf for receiving a description of any error that -* might have occured. +* might have occurred. * * The functions make internal copies of refname and msg, so the * caller retains ownership of these parameters. sha1-lookup.c +1
-1@@ -199,7 +199,7 @@ int sha1_entry_pos(const void *table,break ; ofs_0 = ofs;/* -* byte 0 thru (ofs-1) are the same between +* byte 0 through (ofs-1) are the same between * lo and hi; ofs is the first byte that is * different. * t/t5535-fetch-push-symref.sh +1
-1@@ -1,6 +1,6 @@ #!/bin/sh -test_description='avoiding conflicting update thru symref aliasing' +test_description='avoiding conflicting update through symref aliasing' . ./test-lib.sht/t6030-bisect-porcelain.sh +1
-1@@ -721,7 +721,7 @@ git bisect good 3de952f2416b6084f557ec417709eac740c6818c # first bad commit: [32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>. EOF -test_expect_success 'bisect log: successfull result' ' +test_expect_success 'bisect log: successful result' ' git bisect reset && git bisect start $HASH4 $HASH2 && git bisect good &&worktree.c +1
-1@@ -18,7 +18,7 @@ void free_worktrees(struct worktree **worktrees)/* * read 'path_to_ref' into 'ref'. Also if is_detached is not NULL, -* set is_detached to 1 (0) if the ref is detatched (is not detached). +* set is_detached to 1 (0) if the ref is detached (is not detached). * * $GIT_COMMON_DIR/$symref (e.g. HEAD) is practically outside $GIT_DIR so * for linked worktrees, `resolve_ref_unsafe()` won't work (it uses
I went by word-count: "through" was way more common than "thru", so I kept the fix.
BTW, I used codespell to fix those, I didn't do it by hand :]
https://github.com/lucasdemarchi/codespell
I can remove the "thru" fixes if you'd prefer, and resend with only the other fixes.
Cheers,
Eric
Quoted 221 lines · Junio C Hamano
Quoted 2 lines · Eric Engestrom
Signed-off-by Eric Engestrom <[email protected]>---
While I think "through" is not wrong, I do not think it is worth the patch churn to do s/thru/through/;
If the original author wants to spell the word "thru", we are in no position to say it must be spelled "through" [*1*]. It's a bit different from correcting a non-word "usefull" to "useful". The only "Huh?" I saw around "thru" in this patch was that these said "fall thru" while I am fairly sure there are many places that say "fallthru", which is fairly common way to say that word in comments.
Other changes looked all sensible.
Thanks for going through the codebase with a fine-toothed comb.
[Footnote]
*1* http://www.merriam-webster.com/words-at-play/how-thru-turned-into-through
and http://grammarist.com/spelling/through-thru/ were amusing reads.Quoted 197 lines
builtin/apply.c | 2 +- builtin/clean.c | 2 +- config.c | 2 +- contrib/examples/git-am.sh | 2 +- contrib/hooks/multimail/README | 2 +- contrib/subtree/t/t7900-subtree.sh | 2 +- diff.c | 2 +- dir.c | 2 +- git-p4.py | 2 +- refs.h | 2 +- sha1-lookup.c | 2 +- t/t5535-fetch-push-symref.sh | 2 +- t/t6030-bisect-porcelain.sh | 2 +- worktree.c | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-)builtin/apply.c +1
-1@@ -3980,7 +3980,7 @@ static void show_rename_copy(struct patch *p) old = slash_old +1 ; new = slash_new +1 ; } -/* p->old_name thru old is the common prefix, and old and new +/* p->old_name through old is the common prefix, and old and new * through the end of names are renames */ if (old != p->old_name)builtin/clean.c +1
-1@@ -192,7 +192,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,strbuf_setlen (path, len);strbuf_addstr (path, e->d_name);if (lstat (path->buf, &st)) - ;/* fall thru */ + ;/* fall through */ else if (S_ISDIR (st.st_mode)) {if (remove_dirs (path, prefix, force_flag, dry_run, quiet, &gone)) ret =1 ;config.c +1
-1@@ -1278,7 +1278,7 @@ static void git_config_raw(config_fn_t fn, void *data)* something went really wrong and we should stop * immediately. */ -die (_ ("unknown error occured while reading the configuration files" )); +die (_ ("unknown error occurred while reading the configuration files" )); }static void configset_iter (struct config_set *cs,config_fn_t fn,void *data)contrib/examples/git-am.sh +1
-1@@ -542,7 +542,7 @@ then rm -f "$dotest/dirtyindex" else # Possible stray $dotest directory in the independent-run - # case; in the --rebasing case, it is upto the caller + # case; in the --rebasing case, it is up to the caller # (git-rebase--am) to take care of stray directories. if test -d "$dotest" && test -z "$rebasing" thencontrib/hooks/multimail/README +1
-1@@ -489,7 +489,7 @@ multimailhook.commitLogOpts multimailhook.dateSubstitute String to use as a substitute for ``Date:`` in the output of ``git - log`` while formatting commit messages. This is usefull to avoid + log`` while formatting commit messages. This is useful to avoid emitting a line that can be interpreted by mailers as the start of a cited message (Zimbra webmail in particular). Defaults to ``CommitDate: ``. Set to an empty string or ``none`` to deactivatecontrib/subtree/t/t7900-subtree.sh +1
-1@@ -932,7 +932,7 @@ test_expect_success 'split a new subtree without --onto option' ' # also test that we still can split out an entirely new subtree # if the parent of the first commit in the tree is not empty, - # then the new subtree has accidently been attached to something + # then the new subtree has accidentally been attached to something git subtree split --prefix="sub dir2" --branch subproj2-br && check_equal "$(git log --pretty=format:%P -1 subproj2-br)" "" )diff.c +1
-1@@ -2084,7 +2084,7 @@ static int is_conflict_marker(const char *line, int marker_size, unsigned long lfor (cnt =1 ; cnt < marker_size; cnt++)if (line[cnt] != firstchar)return 0 ; -/* line[1] thru line[marker_size-1] are same as firstchar */ +/* line[1] through line[marker_size-1] are same as firstchar */ if (len < marker_size +1 || !isspace (line[marker_size]))return 0 ;return 1 ;dir.c +1
-1@@ -2166,7 +2166,7 @@ static int remove_dir_recurse(struct strbuf *path, int flag, int *kept_up)* wanted anyway */ continue ; -/* fall thru */ +/* fall through */ }else if (S_ISDIR (st.st_mode)) {if (!remove_dir_recurse (path, flag, &kept_down))continue ;/* happy */ git-p4.py +1
-1@@ -1918,7 +1918,7 @@ def run(self, args): if self.useClientSpec: self.clientSpecDirs = getClientSpec() - # Check for the existance of P4 branches + # Check for the existence of P4 branches branchesDetected = (len(p4BranchesInGit().keys()) > 1) if self.useClientSpec and not branchesDetected:refs.h +1
-1@@ -336,7 +336,7 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err);* msg -- a message describing the change (for the reflog). * * err -- a strbuf for receiving a description of any error that -* might have occured. +* might have occurred. * * The functions make internal copies of refname and msg, so the * caller retains ownership of these parameters. sha1-lookup.c +1
-1@@ -199,7 +199,7 @@ int sha1_entry_pos(const void *table,break ; ofs_0 = ofs;/* -* byte 0 thru (ofs-1) are the same between +* byte 0 through (ofs-1) are the same between * lo and hi; ofs is the first byte that is * different. * t/t5535-fetch-push-symref.sh +1
-1@@ -1,6 +1,6 @@ #!/bin/sh -test_description='avoiding conflicting update thru symref aliasing' +test_description='avoiding conflicting update through symref aliasing' . ./test-lib.sht/t6030-bisect-porcelain.sh +1
-1@@ -721,7 +721,7 @@ git bisect good 3de952f2416b6084f557ec417709eac740c6818c # first bad commit: [32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>. EOF -test_expect_success 'bisect log: successfull result' ' +test_expect_success 'bisect log: successful result' ' git bisect reset && git bisect start $HASH4 $HASH2 && git bisect good &&worktree.c +1
-1@@ -18,7 +18,7 @@ void free_worktrees(struct worktree **worktrees)/* * read 'path_to_ref' into 'ref'. Also if is_detached is not NULL, -* set is_detached to 1 (0) if the ref is detatched (is not detached). +* set is_detached to 1 (0) if the ref is detached (is not detached). * * $GIT_COMMON_DIR/$symref (e.g. HEAD) is practically outside $GIT_DIR so * for linked worktrees, `resolve_ref_unsafe()` won't work (it uses
Quoted 2 lines · Eric Engestrom
I went by word-count: "through" was way more common than "thru", so I kept the fix.
That is not a "fix" (as it is not touching "mistakes") but "making them consistent". I do not personally feel strongly against such a change, but please leave them out of "Subject: [PATCH] typofix".
Quoted 2 lines
BTW, I used codespell to fix those, I didn't do it by hand :]
https://github.com/lucasdemarchi/codespell
Heh, cute ;-)
Quoted 2 lines
I can remove the "thru" fixes if you'd prefer, and resend with only the other fixes.
Thanks.