]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ja/l10n-fixes'
authorJunio C Hamano <gitster@pobox.com>
Thu, 8 Aug 2019 21:26:10 +0000 (14:26 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Aug 2019 21:26:10 +0000 (14:26 -0700)
A few messages have been updated to help localization better.

* ja/l10n-fixes:
  l10n: reformat some localized strings for v2.23.0

Documentation/config/transfer.txt
Documentation/git-cvsserver.txt
Documentation/git-fetch.txt
Documentation/git-pull.txt
Documentation/git-restore.txt
Documentation/glossary-content.txt
Documentation/technical/api-ref-iteration.txt
commit-graph.c
merge-recursive.c
t/t5324-split-commit-graph.sh
t/t6043-merge-rename-directories.sh

index 4a5dfe2fc1670346485838522ad42a6cc22fabc8..f5b6245270e0e8ddd029eb1f520b3e27210792f4 100644 (file)
@@ -17,7 +17,7 @@ linkgit:git-receive-pack[1]. On the fetch side, malformed objects will
 instead be left unreferenced in the repository.
 +
 Due to the non-quarantine nature of the `fetch.fsckObjects`
-implementation it can not be relied upon to leave the object store
+implementation it cannot be relied upon to leave the object store
 clean like `receive.fsckObjects` can.
 +
 As objects are unpacked they're written to the object store, so there
index f98b7c6ed7c0fe4df8a0e3211eaa53ea7c95d5d9..79e22b1f3a131ea5301a1c11fb558ec16e6c16e6 100644 (file)
@@ -232,7 +232,7 @@ write so it might not be enough to grant the users using
 'git-cvsserver' write access to the database file without granting
 them write access to the directory, too.
 
-The database can not be reliably regenerated in a
+The database cannot be reliably regenerated in a
 consistent form after the branch it is tracking has changed.
 Example: For merged branches, 'git-cvsserver' only tracks
 one branch of development, and after a 'git merge' an
index 266d63cf111c8a73420c5fa945543384e9825b55..5b1909fdf4ffcf00d52997eb1a1c2b42385689a7 100644 (file)
@@ -262,7 +262,7 @@ This updates (or creates, as necessary) branches `pu` and `tmp` in
 the local repository by fetching from the branches (respectively)
 `pu` and `maint` from the remote repository.
 +
-The `pu` branch will be updated even if it is does not fast-forward,
+The `pu` branch will be updated even if it does not fast-forward,
 because it is prefixed with a plus sign; `tmp` will not be.
 
 * Peek at a remote's branch, without configuring the remote in your local
@@ -285,7 +285,7 @@ BUGS
 ----
 Using --recurse-submodules can only fetch new commits in already checked
 out submodules right now. When e.g. upstream added a new submodule in the
-just fetched commits of the superproject the submodule itself can not be
+just fetched commits of the superproject the submodule itself cannot be
 fetched, making it impossible to check out that submodule later without
 having to do a fetch again. This is expected to be fixed in a future Git
 version.
index a5e9501a0aa6503eaab62190253afa750dd76eef..dfb901f8b8358ea309e6403079e3c87fb82fee6f 100644 (file)
@@ -249,7 +249,7 @@ BUGS
 ----
 Using --recurse-submodules can only fetch new commits in already checked
 out submodules right now. When e.g. upstream added a new submodule in the
-just fetched commits of the superproject the submodule itself can not be
+just fetched commits of the superproject the submodule itself cannot be
 fetched, making it impossible to check out that submodule later without
 having to do a fetch again. This is expected to be fixed in a future Git
 version.
index d90093f195bc6a9b2b3d2d20be89c59e4d708739..1ab2e40ea938195aa8f1bd45f5bf3ae711b7055a 100644 (file)
@@ -39,7 +39,7 @@ OPTIONS
        commit, branch or tag associated with it.
 +
 If not specified, the default restore source for the working tree is
-the index, and the default restore source for the index index is
+the index, and the default restore source for the index is
 `HEAD`. When both `--staged` and `--worktree` are specified,
 `--source` must also be specified.
 
index 8d38ae6010866a157dfdb7d52b58605d1cd2f3b6..090c888335d3292331d012a5e9074f970035d83e 100644 (file)
@@ -255,7 +255,7 @@ This commit is referred to as a "merge commit", or sometimes just a
 [[def_object]]object::
        The unit of storage in Git. It is uniquely identified by the
        <<def_SHA1,SHA-1>> of its contents. Consequently, an
-       object can not be changed.
+       object cannot be changed.
 
 [[def_object_database]]object database::
        Stores a set of "objects", and an individual <<def_object,object>> is
index 46c3d5c3550a1ba7c83b6937fe68538c3c12074e..ad9d019ff9b4602a72f9542dd15b17a324f95758 100644 (file)
@@ -54,7 +54,7 @@ this:
 do not do this you will get an error for each ref that it does not point
 to a valid object.
 
-Note: As a side-effect of this you can not safely assume that all
+Note: As a side-effect of this you cannot safely assume that all
 objects you lookup are available in superproject. All submodule objects
 will be available the same way as the superprojects objects.
 
index b3c4de79b6da4502726dbec5e21b11734d76e28e..90fdee9256977ad4626737b5acbd4d4e6c0ad48d 100644 (file)
@@ -1636,7 +1636,7 @@ static void sort_and_scan_merged_commits(struct write_commit_graph_context *ctx)
                                num_parents++;
 
                        if (num_parents > 2)
-                               ctx->num_extra_edges += num_parents - 2;
+                               ctx->num_extra_edges += num_parents - 1;
                }
        }
 
index 12300131fc12b15fbc9514e90ca45d76113d7267..6b812d67e3ecd54ece21c2465ede3e28d6fba325 100644 (file)
@@ -2863,7 +2863,8 @@ static int detect_and_process_renames(struct merge_options *opt,
        head_pairs = get_diffpairs(opt, common, head);
        merge_pairs = get_diffpairs(opt, common, merge);
 
-       if (opt->detect_directory_renames) {
+       if ((opt->detect_directory_renames == 2) ||
+           (opt->detect_directory_renames == 1 && !opt->call_depth)) {
                dir_re_head = get_directory_renames(head_pairs);
                dir_re_merge = get_directory_renames(merge_pairs);
 
index 03f45a1ed9023c2b3371bdac70f7abadd14b4202..99f4ef4c19dff028facac6da810c973b3a82a4fc 100755 (executable)
@@ -319,7 +319,9 @@ test_expect_success 'add octopus merge' '
        git merge commits/3 commits/4 &&
        git branch merge/octopus &&
        git commit-graph write --reachable --split &&
-       git commit-graph verify &&
+       git commit-graph verify 2>err &&
+       test_line_count = 3 err &&
+       test_i18ngrep ! warning err &&
        test_line_count = 3 $graphdir/commit-graph-chain
 '
 
index 50b7543483e9988f3a97d7782e11504f82558af4..c966147d5d73ee669321f3efcf57e32a80259076 100755 (executable)
@@ -4403,4 +4403,115 @@ test_expect_success '13d-check(info): messages for rename/rename(1to1) via dual
        )
 '
 
+# Testcase 13e, directory rename in virtual merge base
+#
+# This testcase has a slightly different setup than all the above cases, in
+# order to include a recursive case:
+#
+#      A   C
+#      o - o
+#     / \ / \
+#  O o   X   ?
+#     \ / \ /
+#      o   o
+#      B   D
+#
+#   Commit O: a/{z,y}
+#   Commit A: b/{z,y}
+#   Commit B: a/{z,y,x}
+#   Commit C: b/{z,y,x}
+#   Commit D: b/{z,y}, a/x
+#   Expected: b/{z,y,x}  (sort of; see below for why this might not be expected)
+#
+#   NOTES: 'X' represents a virtual merge base.  With the default of
+#          directory rename detection yielding conflicts, merging A and B
+#          results in a conflict complaining about whether 'x' should be
+#          under 'a/' or 'b/'.  However, when creating the virtual merge
+#          base 'X', since virtual merge bases need to be written out as a
+#          tree, we cannot have a conflict, so some resolution has to be
+#          picked.
+#
+#          In choosing the right resolution, it's worth noting here that
+#          commits C & D are merges of A & B that choose different
+#          locations for 'x' (i.e. they resolve the conflict differently),
+#          and so it would be nice when merging C & D if git could detect
+#          this difference of opinion and report a conflict.  But the only
+#          way to do so that I can think of would be to have the virtual
+#          merge base place 'x' in some directory other than either 'a/' or
+#          'b/', which seems a little weird -- especially since it'd result
+#          in a rename/rename(1to2) conflict with a source path that never
+#          existed in any version.
+#
+#          So, for now, when directory rename detection is set to
+#          'conflict' just avoid doing directory rename detection at all in
+#          the recursive case.  This will not allow us to detect a conflict
+#          in the outer merge for this special kind of setup, but it at
+#          least avoids hitting a BUG().
+#
+test_expect_success '13e-setup: directory rename detection in recursive case' '
+       test_create_repo 13e &&
+       (
+               cd 13e &&
+
+               mkdir a &&
+               echo z >a/z &&
+               echo y >a/y &&
+               git add a &&
+               test_tick &&
+               git commit -m "O" &&
+
+               git branch O &&
+               git branch A &&
+               git branch B &&
+
+               git checkout A &&
+               git mv a/ b/ &&
+               test_tick &&
+               git commit -m "A" &&
+
+               git checkout B &&
+               echo x >a/x &&
+               git add a &&
+               test_tick &&
+               git commit -m "B" &&
+
+               git branch C A &&
+               git branch D B &&
+
+               git checkout C &&
+               test_must_fail git -c merge.directoryRenames=conflict merge B &&
+               git add b/x &&
+               test_tick &&
+               git commit -m "C" &&
+
+
+               git checkout D &&
+               test_must_fail git -c merge.directoryRenames=conflict merge A &&
+               git add b/x &&
+               mkdir a &&
+               git mv b/x a/x &&
+               test_tick &&
+               git commit -m "D"
+       )
+'
+
+test_expect_success '13e-check: directory rename detection in recursive case' '
+       (
+               cd 13e &&
+
+               git checkout --quiet D^0 &&
+
+               git -c merge.directoryRenames=conflict merge -s recursive C^0 >out 2>err &&
+
+               test_i18ngrep ! CONFLICT out &&
+               test_i18ngrep ! BUG: err &&
+               test_i18ngrep ! core.dumped err &&
+               test_must_be_empty err &&
+
+               git ls-files >paths &&
+               ! grep a/x paths &&
+               grep b/x paths
+       )
+'
+
 test_done