*: fix typos which duplicate a word

Fix typos in code comments which repeat various words. Most of the cases are simple in that they repeat a word that usually cannot be repeated in a grammatically correct sentence. Just remove the incorrectly duplicated word in these cases and rewrap text, if needed. A tricky case is usage of "that that", which is sometimes grammatically correct. However, an instance of this in "t7527-builtin-fsmonitor.sh" doesn't need two words "that", because there is only one daemon being discussed, so replace the second "that" with "the". Reword code comment "entries exist on on-disk index" in function update_one in file cache-tree.c, by replacing incorrect preposition "on" with "in". Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Andrei Rybak committed Jan 7, 2023 at 14:56 UTC b39a84185e79cff69f9f1f79f1edb014ef27b9c6
9 files changed +14 -15
Documentation/gitprotocol-v2.txt
+1 -1
@@ -665,7 +665,7 @@ headers and their prerequisite relationships, or something else.
665 +
666 Server operators should feel confident in turning on "bundle-uri" and
667 not worry if e.g. their CDN goes down that clones or fetches will run
668 -into hard failures. Even if the server bundle bundle(s) are
668 +into hard failures. Even if the server bundle(s) are
669 incomplete, or bad in some way the client should still end up with a
670 functioning repository, just as if it had chosen not to use this
671 protocol extension.
builtin/checkout.c
+1 -1
@@ -1270,7 +1270,7 @@ static int parse_branchname_arg(int argc, const char **argv,
1270 * between A and B, A...B names that merge base.
1271 *
1272 * (b) If <something> is _not_ a commit, either "--" is present
1273 - * or <something> is not a path, no -t or -b was given, and
1273 + * or <something> is not a path, no -t or -b was given,
1274 * and there is a tracking branch whose name is <something>
1275 * in one and only one remote (or if the branch exists on the
1276 * remote named in checkout.defaultRemote), then this is a
builtin/submodule--helper.c
+2 -3
@@ -3219,9 +3219,8 @@ static void die_on_index_match(const char *path, int force)
3219 ensure_full_index(&the_index);
3220
3221 /*
3222 - * Since there is only one pathspec, we just need
3223 - * need to check ps_matched[0] to know if a cache
3224 - * entry matched.
3222 + * Since there is only one pathspec, we just need to
3223 + * check ps_matched[0] to know if a cache entry matched.
3224 */
3225 for (i = 0; i < the_index.cache_nr; i++) {
3226 ce_path_match(&the_index, the_index.cache[i], &ps,
cache-tree.c
+1 -1
@@ -405,7 +405,7 @@ static int update_one(struct cache_tree *it,
405 }
406
407 /*
408 - * CE_INTENT_TO_ADD entries exist on on-disk index but
408 + * CE_INTENT_TO_ADD entries exist in on-disk index but
409 * they are not part of generated trees. Invalidate up
410 * to root to force cache-tree users to read elsewhere.
411 */
config.c
+1 -1
@@ -3154,7 +3154,7 @@ int git_config_set_gently(const char *key, const char *value)
3154 int repo_config_set_worktree_gently(struct repository *r,
3155 const char *key, const char *value)
3156 {
3157 - /* Only use worktree-specific config if it is is already enabled. */
3157 + /* Only use worktree-specific config if it is already enabled. */
3158 if (repository_format_worktree_config) {
3159 char *file = repo_git_path(r, "config.worktree");
3160 int ret = git_config_set_multivar_in_file_gently(
run-command.c
+1 -1
@@ -1853,7 +1853,7 @@ enum start_bg_result start_bg_command(struct child_process *cmd,
1853 *
1854 * We also assume that `start_command()` does not add
1855 * us to the cleanup list. And that it calls
1856 - * calls `child_process_clear()`.
1856 + * `child_process_clear()`.
1857 */
1858 sbgr = SBGR_ERROR;
1859 goto done;
t/t4301-merge-tree-write-tree.sh
+2 -2
@@ -141,7 +141,7 @@ test_expect_success 'test conflict notices and such' '
141 # Commit O: foo, olddir/{a,b,c}
142 # Commit A: modify foo, newdir/{a,b,c}
143 # Commit B: modify foo differently & rename foo -> olddir/bar
144 -# Expected: CONFLICT(content) for for newdir/bar (not olddir/bar or foo)
144 +# Expected: CONFLICT(content) for newdir/bar (not olddir/bar or foo)
145
146 test_expect_success 'directory rename + content conflict' '
147 # Setup
@@ -653,7 +653,7 @@ test_expect_success 'mod6: chains of rename/rename(1to2) and add/add via collidi
653 # Commit O: foo, olddir/{a,b,c}
654 # Commit A: delete foo, rename olddir/ -> newdir/, add newdir/bar/file
655 # Commit B: modify foo & rename foo -> olddir/bar
656 -# Expected: CONFLICT(content) for for newdir/bar (not olddir/bar or foo)
656 +# Expected: CONFLICT(content) for newdir/bar (not olddir/bar or foo)
657
658 test_expect_success 'directory rename + rename/delete + modify/delete + directory/file conflict' '
659 # Setup
t/t6421-merge-partial-clone.sh
+2 -2
@@ -155,7 +155,7 @@ test_setup_repo () {
155 # Commit A:
156 # (Rename leap->jump, rename basename/ -> basename/subdir/, rename dir/
157 # -> folder/, move e into newsubdir, add newfile.rs, remove f, modify
158 -# both both Makefiles and jumps)
158 +# both Makefiles and jumps)
159 # general/{jump1_A, jump2_A}
160 # basename/subdir/{numbers_A, sequence_A, values_A}
161 # folder/subdir/{a,b,c,d,Makefile_TOP_A}
@@ -343,7 +343,7 @@ test_expect_merge_algorithm failure success 'Objects downloaded when a directory
343 # Commit A:
344 # (Rename leap->jump, rename basename/ -> basename/subdir/, rename dir/
345 # -> folder/, move e into newsubdir, add newfile.rs, remove f, modify
346 -# both both Makefiles and jumps)
346 +# both Makefiles and jumps)
347 # general/{jump1_A, jump2_A}
348 # basename/subdir/{numbers_A, sequence_A, values_A}
349 # folder/subdir/{a,b,c,d,Makefile_TOP_A}
t/t7527-builtin-fsmonitor.sh
+3 -3
@@ -904,7 +904,7 @@ test_expect_success "submodule absorbgitdirs implicitly starts daemon" '
904
905 # On a case-insensitive file system, confirm that the daemon
906 # notices when the .git directory is moved/renamed/deleted
907 -# regardless of how it is spelled in the the FS event.
907 +# regardless of how it is spelled in the FS event.
908 # That is, does the FS event receive the spelling of the
909 # operation or does it receive the spelling preserved with
910 # the file/directory.
@@ -922,8 +922,8 @@ test_expect_success CASE_INSENSITIVE_FS 'case insensitive+preserving' '
922 test_path_is_dir test_insensitive/.git &&
923 test_path_is_dir test_insensitive/.GIT &&
924
925 - # Rename .git using an alternate spelling to verify that that
926 - # daemon detects it and automatically shuts down.
925 + # Rename .git using an alternate spelling to verify that
926 + # the daemon detects it and automatically shuts down.
927 mv test_insensitive/.GIT test_insensitive/.FOO &&
928
929 # See [1] above.