Skip to content
Snippets Groups Projects
Unverified Commit 5b796658 authored by 秃头灯笼鱼's avatar 秃头灯笼鱼 Committed by Hosted Weblate
Browse files

Translated using Weblate (Chinese (Simplified))

Currently translated at 30.8% (3393 of 10990 strings)

Translation: Git Manpages/Translations
Translate-URL: https://hosted.weblate.org/projects/git-manpages/translations/zh_Hans/


Signed-off-by: default avatar秃头灯笼鱼 <ttdlyu@163.com>
parent cffeb882
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
# This file is distributed under the same license as the Git package.
# Matthias Aßhauer <mha1993@live.de>, 2019.
msgid ""
msgstr "Project-Id-Version: git documentation\nReport-Msgid-Bugs-To: jn.avila@free.fr\nPOT-Creation-Date: 2023-02-26 14:06+0100\nPO-Revision-Date: 2023-03-25 18:56+0000\nLast-Translator: 张天赐 <472546172@qq.com>\nLanguage-Team: LANGUAGE <LL@li.org>\nLanguage: zh_HANS-CN\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\nX-Generator: Weblate 4.17-dev\n"
msgstr "Project-Id-Version: git documentation\nReport-Msgid-Bugs-To: jn.avila@free.fr\nPOT-Creation-Date: 2023-02-26 14:06+0100\nPO-Revision-Date: 2023-03-27 16:37+0000\nLast-Translator: 秃头灯笼鱼 <ttdlyu@163.com>\nLanguage-Team: LANGUAGE <LL@li.org>\nLanguage: zh_HANS-CN\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=1; plural=0;\nX-Generator: Weblate 4.17-dev\n"
 
#. type: Labeled list
#: en/blame-options.txt:1 en/diff-options.txt:769 en/git-instaweb.txt:45 en/git-mailinfo.txt:49 en/git-mailsplit.txt:35 en/git-repack.txt:146 en/git-status.txt:31
......@@ -69896,31 +69896,31 @@ msgstr "测试套件的另一个好处是,当你有一个测试套件时,你
#: en/git-bisect-lk2009.txt:893
#, priority:100
msgid "So if you know how to create test cases and how to bisect, you will be subject to a virtuous circle:"
msgstr ""
msgstr "因此,如果你知道如何创建测试用例和二分,你就会受到良性循环的影响:"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:895
#, priority:100
msgid "more tests => easier to create tests => easier to bisect => more tests"
msgstr ""
msgstr "更多的测试 => 更容易创建测试 => 更容易二分 => 更多的测试"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:898
#, priority:100
msgid "So test suites and \"git bisect\" are complementary tools that are very powerful and efficient when used together."
msgstr ""
msgstr "因此,测试套件和 \"git bisect \"是互补的工具,一起使用时非常强大和高效。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:900
#, no-wrap, priority:100
msgid "Bisecting build failures"
msgstr ""
msgstr "对构建失败的二分"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:904
#, priority:100
msgid "You can very easily automatically bisect broken builds using something like:"
msgstr ""
msgstr "你可以非常容易地使用类似的东西来自动划分破碎的构建:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:908
......@@ -69936,7 +69936,7 @@ msgstr ""
#: en/git-bisect-lk2009.txt:911
#, no-wrap, priority:100
msgid "Passing sh -c \"some commands\" to \"git bisect run\""
msgstr ""
msgstr "将sh -c \"一些命令 \"传递给 \"git bisect运行\""
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:917
......@@ -69948,25 +69948,25 @@ msgstr "$ git bisect run sh -c \"make || exit 125; ./my_app | grep 'good output'
#: en/git-bisect-lk2009.txt:921
#, priority:100
msgid "On the other hand if you do this often, then it can be worth having scripts to avoid too much typing."
msgstr ""
msgstr "另一方面,如果你经常这样做,那么就值得用脚本来避免过多的输入。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:923
#, no-wrap, priority:100
msgid "Finding performance regressions"
msgstr ""
msgstr "寻找性能回归"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:927
#, priority:100
msgid "Here is an example script that comes slightly modified from a real world script used by Junio Hamano <<4>>."
msgstr ""
msgstr "这里有一个例子,它是由Junio Hamano使用真实案例的脚本稍加修改而成的<<4>>。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:930
#, priority:100
msgid "This script can be passed to \"git bisect run\" to find the commit that introduced a performance regression:"
msgstr ""
msgstr "这个脚本可以传递给 \"git bisect run\",以找到引入性能回归的提交:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:936
......@@ -69974,7 +69974,7 @@ msgstr ""
msgid ""
"# Build errors are not what I am interested in.\n"
"make my_app || exit 255\n"
msgstr ""
msgstr "# 我并不关心构建中的错误。\nmake my_app || exit 255\n"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:939
......@@ -69982,7 +69982,7 @@ msgstr ""
msgid ""
"# We are checking if it stops in a reasonable amount of time, so\n"
"# let it run in the background...\n"
msgstr ""
msgstr "# 我们要检查它是否在合理的时间内停止,所以\n# 让它在后台运行...\n"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:941
......@@ -69996,7 +69996,7 @@ msgstr "./my_app >log 2>&1 &\n"
msgid ""
"# ... and grab its process ID.\n"
"pid=$!\n"
msgstr ""
msgstr "# ... 并抓取其进程ID。\npid=$!\n"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:947
......@@ -70004,7 +70004,7 @@ msgstr ""
msgid ""
"# ... and then wait for sufficiently long.\n"
"sleep $NORMAL_TIME\n"
msgstr ""
msgstr "# ... 然后等待足够长的时间。\nsleep $NORMAL_TIME\n"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:959
......@@ -70021,109 +70021,109 @@ msgid ""
"\t# and we are happy.\n"
"\texit 0\n"
"fi\n"
msgstr ""
msgstr "# ... 然后看看这个进程是否还在那里。\nif kill -0 $pid\nthen\n\t# 它仍然在运行 -- 有点失望。\n\tkill $pid; sleep 1; kill $pid;\n\texit 1\nelse\n\t# 它已经结束了($pid进程不再存在),\n\t# 皆大欢喜。\n\texit 0\nfi\n"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:962
#, no-wrap, priority:100
msgid "Following general best practices"
msgstr ""
msgstr "遵循一般的最佳做法"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:967
#, priority:100
msgid "It is obviously a good idea not to have commits with changes that knowingly break things, even if some other commits later fix the breakage."
msgstr ""
msgstr "显然,不要在提交时明知故犯是最好的,即使后来有其他的提交修复了错误。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:970
#, priority:100
msgid "It is also a good idea when using any VCS to have only one small logical change in each commit."
msgstr ""
msgstr "在使用任何VCS时,最好是每次提交只有一个小的逻辑变化。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:975
#, priority:100
msgid "The smaller the changes in your commit, the most effective \"git bisect\" will be. And you will probably need \"git bisect\" less in the first place, as small changes are easier to review even if they are only reviewed by the committer."
msgstr ""
msgstr "你的提交中的改动越小,\"git bisect \"就越有效。并且你可能一开始就不太需要 \"git bisect\",因为即使只有提交者审查,小改动也更容易审查。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:978
#, priority:100
msgid "Another good idea is to have good commit messages. They can be very helpful to understand why some changes were made."
msgstr ""
msgstr "另一个好的办法是要有一个明确的提交信息。它们对于理解为什么要做一些改动是非常有帮助的。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:980
#, priority:100
msgid "These general best practices are very helpful if you bisect often."
msgstr ""
msgstr "如果你经常进行二分操作,一般这些最佳实践是非常有帮助的。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:982
#, no-wrap, priority:100
msgid "Avoiding bug prone merges"
msgstr ""
msgstr "避免容易出错的合并"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:988
#, priority:100
msgid "First merges by themselves can introduce some regressions even when the merge needs no source code conflict resolution. This is because a semantic change can happen in one branch while the other branch is not aware of it."
msgstr ""
msgstr "即便合并不需要解决源代码冲突,但一次合并本身就会带来一些回归问题。这是因为语义变化可能发生在一个分支,而另一个分支并不知道该变化。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:991
#, priority:100
msgid "For example one branch can change the semantic of a function while the other branch add more calls to the same function."
msgstr ""
msgstr "例如,一个分支可以改变一个函数的语义,而另一个分支则对同一个函数增加更多的调用。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:998
#, priority:100
msgid "This is made much worse if many files have to be fixed to resolve conflicts. That's why such merges are called \"evil merges\". They can make regressions very difficult to track down. It can even be misleading to know the first bad commit if it happens to be such a merge, because people might think that the bug comes from bad conflict resolution when it comes from a semantic change in one branch."
msgstr ""
msgstr "如果为了解决冲突而不得不修复许多文件,情况就会变得更糟。这就是为什么这种合并被称为 \"邪恶合并\"。它们会使回归变得非常难以追踪。如果恰好合并了一个这样的坏提交,就很可能会产生误会,因为人们可能会认为这个错误来自于糟糕的冲突解决,但事实上它来自于一个分支的语义变化。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1004
#, priority:100
msgid "Anyway \"git rebase\" can be used to linearize history. This can be used either to avoid merging in the first place. Or it can be used to bisect on a linear history instead of the non linear one, as this should give more information in case of a semantic change in one branch."
msgstr ""
msgstr "无论如何,\"git rebase \"可以用来线性化历史。这也可以用来一开始就避免错误的合并。或者,它可以用来在线性历史上进行二分,而不是在非线性历史上进行二分,因为这在一个分支发生语义变化的情况下会提供更多信息。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1007
#, priority:100
msgid "Merges can be also made simpler by using smaller branches or by using many topic branches instead of only long version related branches."
msgstr ""
msgstr "通过使用较小的分支或使用许多主题分支而不是只使用一个非常长的分支,也可以使合并更简单。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1010
#, priority:100
msgid "And testing can be done more often in special integration branches like linux-next for the linux kernel."
msgstr ""
msgstr "而测试可以在特殊的集成分支中更频繁地进行,比如linux-next的linux内核。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:1012
#, no-wrap, priority:100
msgid "Adapting your work-flow"
msgstr ""
msgstr "调整你的工作流程"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1015
#, priority:100
msgid "A special work-flow to process regressions can give great results."
msgstr ""
msgstr "一个处理回归的特殊工作流程可以带来好的结果。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1017
#, priority:100
msgid "Here is an example of a work-flow used by Andreas Ericsson:"
msgstr ""
msgstr "比如,以下是Andreas Ericsson使用的一个工作流程:"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1019
#, priority:100
msgid "write, in the test suite, a test script that exposes the regression"
msgstr ""
msgstr "在测试套件中,写一个测试脚本,暴露出回归的问题"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1020
......@@ -70135,109 +70135,109 @@ msgstr "使用 \"git bisect run\" 查找引入它的提交"
#: en/git-bisect-lk2009.txt:1021
#, priority:100
msgid "fix the bug that is often made obvious by the previous step"
msgstr ""
msgstr "修复由上一步骤暴露出来的错误"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1022
#, priority:100
msgid "commit both the fix and the test script (and if needed more tests)"
msgstr ""
msgstr "提交修复和测试脚本(如果需要更多测试)"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1024
#, priority:100
msgid "And here is what Andreas said about this work-flow <<5>>:"
msgstr ""
msgstr "这里是Andreas对这个工作流程的评价<<5>>:"
 
#. type: delimited block _
#: en/git-bisect-lk2009.txt:1034
#, priority:100
msgid "To give some hard figures, we used to have an average report-to-fix cycle of 142.6 hours (according to our somewhat weird bug-tracker which just measures wall-clock time). Since we moved to Git, we've lowered that to 16.2 hours. Primarily because we can stay on top of the bug fixing now, and because everyone's jockeying to get to fix bugs (we're quite proud of how lazy we are to let Git find the bugs for us). Each new release results in ~40% fewer bugs (almost certainly due to how we now feel about writing tests)."
msgstr ""
msgstr "我们曾经有142.6小时的平均报告到修复周期(由我们只是测量时钟时间的错误跟踪器统计出)。自从我们转移到Git后,我们已经把这个时间降低到了16.2小时。主要是因为我们现在可以保持在最开始进行错误修复,也因为每个人都在争先恐后地修复错误(我们对自己懒得让Git为我们找到错误感到很自豪)。每个新的版本都会减少40%的bug(出于我们现在对编写测试的感觉,这个结果非常可信)。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1039
#, priority:100
msgid "Clearly this work-flow uses the virtuous circle between test suites and \"git bisect\". In fact it makes it the standard procedure to deal with regression."
msgstr ""
msgstr "显然,这个工作流程使用了测试套件和 \"git bisect \"之间的良性循环。事实上,也正是因此它才成为为处理回归的标准程序。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1044
#, ignore-ellipsis, priority:100
msgid "In other messages Andreas says that they also use the \"best practices\" described above: small logical commits, topic branches, no evil merge,... These practices all improve the bisectability of the commit graph, by making it easier and more useful to bisect."
msgstr ""
msgstr "在其他信息中,Andreas说他们也使用了上述的 \"最佳实践\":小的逻辑提交,主题分支,没有邪恶的合并,......。这些做法都提高了提交图的可分性,使之更容易、更有用。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1047
#, priority:100
msgid "So a good work-flow should be designed around the above points. That is making bisecting easier, more useful and standard."
msgstr ""
msgstr "因此,一个好的工作流程应该围绕以上几点来设计。这就是让分界线变得更容易、更有用和更标准。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:1049
#, no-wrap, priority:100
msgid "Involving QA people and if possible end users"
msgstr ""
msgstr "让QA人员参与进来,如果可能的话,让终端用户参与进来"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1055
#, priority:100
msgid "One nice about \"git bisect\" is that it is not only a developer tool. It can effectively be used by QA people or even end users (if they have access to the source code or if they can get access to all the builds)."
msgstr ""
msgstr "关于 \"git bisect \"的一个好处是,它不仅仅是一个开发者工具。它可以有效地被QA人员甚至终端用户使用(如果他们能够访问源代码或者能够获得所有构建的权限)。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1059
#, priority:100
msgid "There was a discussion at one point on the linux kernel mailing list of whether it was ok to always ask end user to bisect, and very good points were made to support the point of view that it is ok."
msgstr ""
msgstr "在linux内核邮件列表中曾一度讨论过总是要求终端用户进行分割是否可行,并提出了非常好的观点来支持可以这样做的观点。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1061
#, priority:100
msgid "For example David Miller wrote <<6>>:"
msgstr ""
msgstr "例如,David Miller写道<<6>>:"
 
#. type: delimited block _
#: en/git-bisect-lk2009.txt:1068
#, priority:100
msgid "What people don't get is that this is a situation where the \"end node principle\" applies. When you have limited resources (here: developers) you don't push the bulk of the burden upon them. Instead you push things out to the resource you have a lot of, the end nodes (here: users), so that the situation actually scales."
msgstr ""
msgstr "人们不明白的是,这是一个适用 \"终端节点原则 \"的情况。当你拥有有限的资源时(这里是指开发人员),你不会把大部分的负担推给他们。相反,你要把事情推给你拥有的大量资源,即终端节点(这里:用户),这样情况才会有实际的扩展。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1072
#, priority:100
msgid "This means that it is often \"cheaper\" if QA people or end users can do it."
msgstr ""
msgstr "这意味着,如果QA人员或终端用户能够做到这一点,往往会 \"更便宜\"。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1079
#, priority:100
msgid "What is interesting too is that end users that are reporting bugs (or QA people that reproduced a bug) have access to the environment where the bug happens. So they can often more easily reproduce a regression. And if they can bisect, then more information will be extracted from the environment where the bug happens, which means that it will be easier to understand and then fix the bug."
msgstr ""
msgstr "有趣的是,报告错误的终端用户(或重现错误的QA人员)可以进入发生错误的环境。所以他们通常可以更容易地重现一个回归。如果他们能进行二分法,那么就可以从发生错误的环境中提取更多的信息,这意味着将更容易理解,然后修复错误。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1083
#, priority:100
msgid "For open source projects it can be a good way to get more useful contributions from end users, and to introduce them to QA and development activities."
msgstr ""
msgstr "对于开源项目来说,这可能是一个很好的方法,可以从终端用户那里获得更多有用的贡献,并将他们引入QA和开发活动。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:1085
#, no-wrap, priority:100
msgid "Using complex scripts"
msgstr ""
msgstr "使用复杂脚本"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1089
#, priority:100
msgid "In some cases like for kernel development it can be worth developing complex scripts to be able to fully automate bisecting."
msgstr ""
msgstr "在某些情况下,如内核开发,值得开发复杂的脚本,以便能够完全自动化地进行二分。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:1091
#, priority:100
msgid "Here is what Ingo Molnar says about that <<7>>:"
msgstr ""
msgstr "以下是Ingo Molnar对此的评价<<7>>:"
 
#. type: delimited block _
#: en/git-bisect-lk2009.txt:1101
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment