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

Translated using Weblate (Chinese (Simplified))

Currently translated at 29.6% (3252 of 10953 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 22dd98dd
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: 2022-11-26 21:11+0100\nPO-Revision-Date: 2023-02-18 23:49+0000\nLast-Translator: taotieren <admin@taotieren.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.16-dev\n"
msgstr "Project-Id-Version: git documentation\nReport-Msgid-Bugs-To: jn.avila@free.fr\nPOT-Creation-Date: 2022-11-26 21:11+0100\nPO-Revision-Date: 2023-02-22 05:06+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.16-dev\n"
 
#. type: Labeled list
#: en/blame-options.txt:1 en/diff-options.txt:763 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
......@@ -68286,7 +68286,7 @@ msgstr "类似于 \"git://example.org/path/to/repo.git\" 的 URL 会被重写为
#: en/git-bisect-lk2009.txt:2
#, no-wrap, priority:100
msgid "Fighting regressions with git bisect"
msgstr "用Git二分查找解决回问题"
msgstr "用Git二分查找解决回退问题"
 
#. type: Title -
#: en/git-bisect-lk2009.txt:8
......@@ -68298,7 +68298,7 @@ msgstr "摘要"
#: en/git-bisect-lk2009.txt:17
#, priority:100
msgid "\"git bisect\" enables software users and developers to easily find the commit that introduced a regression. We show why it is important to have good tools to fight regressions. We describe how \"git bisect\" works from the outside and the algorithms it uses inside. Then we explain how to take advantage of \"git bisect\" to improve current practices. And we discuss how \"git bisect\" could improve in the future."
msgstr "\"Git二分查找\"使软件用户和开发者能够轻松找到引入回的提交。我们展示了为什么拥有好的工具来对抗回归是很重要的。我们描述了 \"Git二分查找 \"从外部如何工作,以及它在内部使用的算法。然后我们解释如何利用 \"Git二分查找\"来改进当前的实践。我们还讨论了 \"Git二分查找\"在未来可以如何改进。"
msgstr "\"Git二分查找\"使软件用户和开发者能够轻松找到引入回退的提交。我们展示了为什么拥有好的工具来解决回退是很重要的。我们描述了 \"Git二分查找 \"从外部如何工作,以及它在内部使用的算法。然后我们解释如何利用 \"Git二分查找\"来改进当前的体验。我们还讨论了 \"Git二分查找\"在未来可以如何改进。"
 
#. type: Title -
#: en/git-bisect-lk2009.txt:20
......@@ -68340,19 +68340,19 @@ msgstr "因此,\"Git二分查找\"被设计用来帮助找到 \"第一个坏
#: en/git-bisect-lk2009.txt:51
#, no-wrap, priority:100
msgid "Fighting regressions overview"
msgstr "解决回概述"
msgstr "解决回退概述"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:54
#, no-wrap, priority:100
msgid "Regressions: a big problem"
msgstr "回:一个大问题"
msgstr "回退:一个大问题"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:58
#, priority:100
msgid "Regressions are a big problem in the software industry. But it's difficult to put some real numbers behind that claim."
msgstr "回是软件行业的一个大问题。但是很难用数字来说明这个问题。"
msgstr "回退是软件行业的一个大问题。但是很难用数字来说明这个问题。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:61
......@@ -68418,7 +68418,7 @@ msgstr "但我们可以猜测,在现有软件上进行改进的代价是非常
#: en/git-bisect-lk2009.txt:121
#, priority:100
msgid "Of course some kind of software is developed, then used during some time without being improved on much, and then finally thrown away. In this case, of course, regressions may not be a big problem. But on the other hand, there is a lot of big software that is continually developed and maintained during years or even tens of years by a lot of people. And as there are often many people who depend (sometimes critically) on such software, regressions are a really big problem."
msgstr "当然,有些软件被开发出来,然后在一段时间内使用中,没有得到很大的改进,最后被废弃。当然,在这种情况下,退步可能不是一个大问题。但另一方面,有很多大型软件是由很多人在几年甚至几十几年的时间里不断开发和维护的。由于经常有许多人依赖这种软件(有时是关键性的),所以回是一个真正的大问题。"
msgstr "当然,有些软件被开发出来,然后在一段时间内使用中,没有得到很大的改进,最后被废弃。当然,在这种情况下,退步可能不是一个大问题。但另一方面,有很多大型软件是由很多人在几年甚至几十几年的时间里不断开发和维护的。由于经常有许多人依赖这种软件(有时是关键性的),所以回退是一个真正的大问题。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:128
......@@ -68430,7 +68430,7 @@ msgstr "Linux内核就是这样一个软件。如果我们看一下Linux内核
#: en/git-bisect-lk2009.txt:134
#, priority:100
msgid "The time between the first rc release and the final release is supposed to be used to test rc versions and fight bugs and especially regressions. And this time is more than 80% of the release cycle time. But this is not the end of the fight yet, as of course it continues after the release."
msgstr "从第一个rc版本到最终版本之间的时间应该是用来测试rc版本和解决bug,特别是回归bug。而这段时间占到了发布周期的80%以上。发布并不意味着战斗结束,因为bug在发布后还会继续出现。"
msgstr "从第一个rc版本到最终版本之间的时间应该是用来测试rc版本和解决bug,特别是回退问题。而这段时间占到了发布周期的80%以上。发布并不意味着战斗结束,因为bug在发布后还会继续出现。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:137
......@@ -68448,55 +68448,55 @@ msgstr "我在合并窗口期最积极地使用它(当大量的树被合并到
#: en/git-bisect-lk2009.txt:149
#, priority:100
msgid "So regressions are fought all the time by developers, and indeed it is well known that bugs should be fixed as soon as possible, so as soon as they are found. That's why it is interesting to have good tools for this purpose."
msgstr "因此,开发人员一直在与回作斗争,事实上,众所周知,错误应该被尽快修复,所以一旦发现就应该尽快修复。这就是为什么有好的工具来达到这个目的是很有趣的。"
msgstr "因此,开发人员一直在与回退作斗争,事实上,众所周知,错误应该被尽快修复,所以一旦发现就应该尽快修复。这就是为什么有好的工具来达到这个目的是很有趣的。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:151
#, no-wrap, priority:100
msgid "Other tools to fight regressions"
msgstr "对抗回归的其他工具"
msgstr "解决回退的其他工具"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:156
#, priority:100
msgid "So what are the tools used to fight regressions? They are nearly the same as those used to fight regular bugs. The only specific tools are test suites and tools similar as \"git bisect\"."
msgstr ""
msgstr "那么,用于解决回退的工具是什么呢?它们几乎与那些用来对付常规bug的工具相同。唯一特殊的工具是测试套件和类似于 \"Git二分查找\"的工具。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:162
#, priority:100
msgid "Test suites are very nice. But when they are used alone, they are supposed to be used so that all the tests are checked after each commit. This means that they are not very efficient, because many tests are run for no interesting result, and they suffer from combinatorial explosion."
msgstr ""
msgstr "测试套件是非常好的。但当它们被单独使用时,它们应该被用来在每次提交后检查所有的测试。这意味着它们的效率并不高,因为许多测试的运行并没有意外的结果,而且它们会受到组合的影响。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:167
#, priority:100
msgid "In fact the problem is that big software often has many different configuration options and that each test case should pass for each configuration after each commit. So if you have for each release: N configurations, M commits and T test cases, you should perform:"
msgstr ""
msgstr "事实上,问题在于大型软件通常有许多不同的配置选项,每次提交后,每个测试用例都应该通过每个配置。因此,如果你对每个版本有N个配置,M个提交,T个测试用例,你应该执行:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:170
#, no-wrap, priority:100
msgid "N * M * T tests\n"
msgstr ""
msgstr "N * M * T 个测试\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:173
#, priority:100
msgid "where N, M and T are all growing with the size your software."
msgstr ""
msgstr "其中N、M和T都是随着你的软件大小而增长的。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:175
#, priority:100
msgid "So very soon it will not be possible to completely test everything."
msgstr ""
msgstr "因此,很快就不可能对所有的东西进行测试。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:182
#, priority:100
msgid "And if some bugs slip through your test suite, then you can add a test to your test suite. But if you want to use your new improved test suite to find where the bug slipped in, then you will either have to emulate a bisection process or you will perhaps bluntly test each commit backward starting from the \"bad\" commit you have which may be very wasteful."
msgstr ""
msgstr "而如果有些bug在你的测试套件中溜走了,那么你可以在你的测试套件中增加一个测试。但是,如果你想用你新改进的测试套件来找到bug溜进去的地方,那么你将不得不模仿一分为二的过程,或者你也许会直截了当地从你的 \"坏 \"提交开始向后测试每个提交,这可能是非常浪费的。"
 
#. type: Title -
#: en/git-bisect-lk2009.txt:184
......@@ -68508,13 +68508,13 @@ msgstr "\"git bisect\" overview"
#: en/git-bisect-lk2009.txt:187
#, no-wrap, priority:100
msgid "Starting a bisection"
msgstr ""
msgstr "开始二分"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:194
#, priority:100
msgid "The first \"git bisect\" subcommand to use is \"git bisect start\" to start the search. Then bounds must be set to limit the commit space. This is done usually by giving one \"bad\" and at least one \"good\" commit. They can be passed in the initial call to \"git bisect start\" like this:"
msgstr ""
msgstr "第一个要使用的 \"Git二分查找\"子命令是 \"git bisect start \"来开始搜索。然后必须设置边界来限制提交空间。这通常是通过给出一个 \"坏 \"和至少一个 \"好 \"的提交来实现的。它们可以像这样在初始调用 \"git bisect start \"时传递:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:197
......@@ -68526,7 +68526,7 @@ msgstr "$ git bisect start [BAD [GOOD...]]\n"
#: en/git-bisect-lk2009.txt:200
#, priority:100
msgid "or they can be set using:"
msgstr ""
msgstr "或者可以用以下方式设置:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:203
......@@ -68550,13 +68550,13 @@ msgstr "$ git bisect good [COMMIT...]\n"
#: en/git-bisect-lk2009.txt:213
#, priority:100
msgid "where BAD, GOOD and COMMIT are all names that can be resolved to a commit."
msgstr ""
msgstr "其中BAD、GOOD和COMMIT都可以解析为提交的名称。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:216
#, priority:100
msgid "Then \"git bisect\" will checkout a commit of its choosing and ask the user to test it, like this:"
msgstr ""
msgstr "然后 \"git bisect \"会给出它所选择的一个提交,并要求用户测试它,就像这样:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:221
......@@ -68565,13 +68565,13 @@ msgid ""
"$ git bisect start v2.6.27 v2.6.25\n"
"Bisecting: 10928 revisions left to test after this (roughly 14 steps)\n"
"[2ec65f8b89ea003c27ff7723525a2ee335a2b393] x86: clean up using max_low_pfn on 32-bit\n"
msgstr ""
msgstr "$ git bisect start v2.6.27 v2.6.25\nBisecting: 10928 revisions left to test after this (roughly 14 steps)\n[2ec65f8b89ea003c27ff7723525a2ee335a2b393] x86: clean up using max_low_pfn on 32-bit\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:229
#, priority:100
msgid "Note that the example that we will use is really a toy example, we will be looking for the first commit that has a version like \"2.6.26-something\", that is the commit that has a \"SUBLEVEL = 26\" line in the top level Makefile. This is a toy example because there are better ways to find this commit with Git than using \"git bisect\" (for example \"git blame\" or \"git log -S<string>\")."
msgstr ""
msgstr "请注意,我们将使用的例子实际上是一个小型例子,我们将寻找第一个版本为 \"2.6.26-something \"的提交,即在顶层 Makefile 中有 \"SUBLEVEL = 26 \"行的提交。这只是一个小型例子,因为除了使用 \"git bisect\",还有更好的方法来找到这个提交(例如 \"git blame \"或 \"git log -S<string>\")。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:231
......@@ -68583,13 +68583,13 @@ msgstr ""
#: en/git-bisect-lk2009.txt:236
#, priority:100
msgid "At this point there are basically 2 ways to drive the search. It can be driven manually by the user or it can be driven automatically by a script or a command."
msgstr ""
msgstr "在这一点上,基本上有两种方式来驱动搜索。它可以由用户手动驱动,也可以由一个脚本或命令自动驱动。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:241
#, priority:100
msgid "If the user is driving it, then at each step of the search, the user will have to test the current commit and say if it is \"good\" or \"bad\" using the \"git bisect good\" or \"git bisect bad\" commands respectively that have been described above. For example:"
msgstr ""
msgstr "如果由用户来驱动,那么在搜索的每一步,用户都必须测试当前的提交,并分别使用上文所述的 \"git bisect good \"或 \"git bisect bad \"命令说它是 \"好 \"还是 \"坏\"。比如:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:246
......@@ -68598,13 +68598,13 @@ msgid ""
"$ git bisect bad\n"
"Bisecting: 5480 revisions left to test after this (roughly 13 steps)\n"
"[66c0b394f08fd89236515c1c84485ea712a157be] KVM: kill file->f_count abuse in kvm\n"
msgstr ""
msgstr "$ git bisect bad\nBisecting: 5480 revisions left to test after this (roughly 13 steps)\n[66c0b394f08fd89236515c1c84485ea712a157be] KVM: kill file->f_count abuse in kvm\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:250
#, priority:100
msgid "And after a few more steps like that, \"git bisect\" will eventually find a first bad commit:"
msgstr ""
msgstr "继续这样做,\"git bisect \"最终会找到第一个坏提交:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:257
......@@ -68632,13 +68632,13 @@ msgstr " Linux 2.6.26-rc1\n"
#: en/git-bisect-lk2009.txt:261
#, ignore-ellipsis, no-wrap, priority:100
msgid ":100644 100644 5cf82581... 4492984e... M Makefile\n"
msgstr ""
msgstr ":100644 100644 5cf82581... 4492984e... M Makefile\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:265
#, priority:100
msgid "At this point we can see what the commit does, check it out (if it's not already checked out) or tinker with it, for example:"
msgstr ""
msgstr "在这一点上,我们可以看到提交的内容,检查(如果它还没有被检查出来)或修补它,比如:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:271
......@@ -68670,19 +68670,19 @@ msgid ""
"+SUBLEVEL = 26\n"
"+EXTRAVERSION = -rc1\n"
" NAME = Funky Weasel is Jiggy wit it\n"
msgstr ""
msgstr "diff --git a/Makefile b/Makefile\nindex 5cf8258..4492984 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1,7 +1,7 @@\n VERSION = 2\n PATCHLEVEL = 6\n-SUBLEVEL = 25\n-EXTRAVERSION =\n+SUBLEVEL = 26\n+EXTRAVERSION = -rc1\n NAME = Funky Weasel is Jiggy wit it\n"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:288
#, no-wrap, priority:100
msgid " # *DOCUMENTATION*\n"
msgstr ""
msgstr " # *文档*\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:292
#, priority:100
msgid "And when we are finished we can use \"git bisect reset\" to go back to the branch we were in before we started bisecting:"
msgstr ""
msgstr "当我们完成后,我们可以使用 \"git bisect reset \"回到我们开始二分前所在的分支:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:298
......@@ -68692,19 +68692,19 @@ msgid ""
"Checking out files: 100% (21549/21549), done.\n"
"Previous HEAD position was 2ddcca3... Linux 2.6.26-rc1\n"
"Switched to branch 'master'\n"
msgstr ""
msgstr "$ git bisect reset\nChecking out files: 100% (21549/21549), done.\nPrevious HEAD position was 2ddcca3... Linux 2.6.26-rc1\nSwitched to branch 'master'\n"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:301
#, no-wrap, priority:100
msgid "Driving a bisection automatically"
msgstr ""
msgstr "自动驱动一个二分查找"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:307
#, priority:100
msgid "The other way to drive the bisection process is to tell \"git bisect\" to launch a script or command at each bisection step to know if the current commit is \"good\" or \"bad\". To do that, we use the \"git bisect run\" command. For example:"
msgstr ""
msgstr "另一种驱动分界进程的方法是告诉 \"git bisect \"在每个分界步骤启动一个脚本或命令,以了解当前提交是 \"好 \"还是 \"坏\"。要做到这一点,我们使用 \"git bisect run \"命令。比如说:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:331
......@@ -68732,71 +68732,69 @@ msgid ""
"commit 2ddcca36c8bcfa251724fe342c8327451988be0d\n"
"Author: Linus Torvalds <torvalds@linux-foundation.org>\n"
"Date: Sat May 3 11:59:44 2008 -0700\n"
msgstr ""
msgstr "$ git bisect start v2.6.27 v2.6.25\nBisecting: 10928 revisions left to test after this (roughly 14 steps)\n[2ec65f8b89ea003c27ff7723525a2ee335a2b393] x86: clean up using max_low_pfn on 32-bit\n$\n$ git bisect run grep '^SUBLEVEL = 25' Makefile\nrunning grep ^SUBLEVEL = 25 Makefile\nBisecting: 5480 revisions left to test after this (roughly 13 steps)\n[66c0b394f08fd89236515c1c84485ea712a157be] KVM: kill file->f_count abuse in kvm\nrunning grep ^SUBLEVEL = 25 Makefile\nSUBLEVEL = 25\nBisecting: 2740 revisions left to test after this (roughly 12 steps)\n[671294719628f1671faefd4882764886f8ad08cb] V4L/DVB(7879): Adding cx18 Support for mxl5005s\n...\n...\nrunning grep ^SUBLEVEL = 25 Makefile\nBisecting: 0 revisions left to test after this (roughly 0 steps)\n[2ddcca36c8bcfa251724fe342c8327451988be0d] Linux 2.6.26-rc1\nrunning grep ^SUBLEVEL = 25 Makefile\n2ddcca36c8bcfa251724fe342c8327451988be0d is the first bad commit\ncommit 2ddcca36c8bcfa251724fe342c8327451988be0d\nAuthor: Linus Torvalds <torvalds@linux-foundation.org>\nDate: Sat May 3 11:59:44 2008 -0700\n"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:336
#, fuzzy, ignore-ellipsis, no-wrap, priority:100
#, ignore-ellipsis, no-wrap, priority:100
msgid ""
":100644 100644 5cf82581... 4492984e... M Makefile\n"
"bisect run success\n"
msgstr ""
":100644 100644 5cf82581... 4492984e... M Makefile\n"
"bisect run success\n"
msgstr ":100644 100644 5cf82581... 4492984e... M Makefile\nbisect run success\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:345
#, priority:100
msgid "In this example, we passed \"grep '^SUBLEVEL = 25' Makefile\" as parameter to \"git bisect run\". This means that at each step, the grep command we passed will be launched. And if it exits with code 0 (that means success) then git bisect will mark the current state as \"good\". If it exits with code 1 (or any code between 1 and 127 included, except the special code 125), then the current state will be marked as \"bad\"."
msgstr ""
msgstr "在这个例子中,我们把 \"grep '^SUBLEVEL = 25' Makefile \"作为参数传给 \"git bisect run\"。这意味着在每个步骤中,我们传递的grep命令将被启动。如果它以代码0退出(这意味着成功),那么git bisect将把当前状态标记为 \"好\"。如果它以代码1退出(或者包括1到127之间的任何代码,除了特殊代码125),那么当前状态将被标记为 \"坏\"。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:350
#, priority:100
msgid "Exit code between 128 and 255 are special to \"git bisect run\". They make it stop immediately the bisection process. This is useful for example if the command passed takes too long to complete, because you can kill it with a signal and it will stop the bisection process."
msgstr ""
msgstr "128和255之间的退出代码是 \"git bisect run \"的特殊代码。它们可以让它立即停止二分查找进程。例如,如果传递的命令需要很长时间才能完成,这很有用,因为你可以用一个信号杀掉该进程,它就会停止二分查找。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:353
#, priority:100
msgid "It can also be useful in scripts passed to \"git bisect run\" to \"exit 255\" if some very abnormal situation is detected."
msgstr ""
msgstr "在传递给 \"git bisect run \"的脚本中,如果检测到一些极端不正常的情况,它也可以起到 \"exit 255 \"的作用。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:355
#, no-wrap, priority:100
msgid "Avoiding untestable commits"
msgstr ""
msgstr "避免不稳定的提交"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:362
#, priority:100
msgid "Sometimes it happens that the current state cannot be tested, for example if it does not compile because there was a bug preventing it at that time. This is what the special exit code 125 is for. It tells \"git bisect run\" that the current commit should be marked as untestable and that another one should be chosen and checked out."
msgstr ""
msgstr "有时会发生当前状态无法测试的情况,例如,因为当时有一个错误阻止了它的编译。这就是特殊退出代码125的作用。它告诉 \"git bisect run\",当前的提交应该被标记为不可测试,应该选择另一个提交并进行检查。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:366
#, priority:100
msgid "If the bisection process is driven manually, you can use \"git bisect skip\" to do the same thing. (In fact the special exit code 125 makes \"git bisect run\" use \"git bisect skip\" in the background.)"
msgstr ""
msgstr "如果e=二分查找过程是手动驱动的,你可以使用 \"git bisect skip \"来做同样的事情。(事实上,特殊的退出代码125使 \"git bisect run \"在后台使用 \"git bisect skip\")。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:371
#, priority:100
msgid "Or if you want more control, you can inspect the current state using for example \"git bisect visualize\". It will launch gitk (or \"git log\" if the `DISPLAY` environment variable is not set) to help you find a better bisection point."
msgstr ""
msgstr "或者如果你想要更多的控制,你可以使用 \"git bisect visualize \"检查当前状态。它将启动gitk(如果没有设置`DISPLAY`环境变量,则启动 \"git log\")来帮助你找到一个更好的分界点。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:376
#, priority:100
msgid "Either way, if you have a string of untestable commits, it might happen that the regression you are looking for has been introduced by one of these untestable commits. In this case it's not possible to tell for sure which commit introduced the regression."
msgstr ""
msgstr "无论如何,如果你有一串不可测试的提交,你要找的回退可能是由其中一个不可测试的提交引入的。在这种情况下,我们不可能确定是哪个提交引入了回退。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:379
#, priority:100
msgid "So if you used \"git bisect skip\" (or the run script exited with special code 125) you could get a result like this:"
msgstr ""
msgstr "因此,如果你使用 \"git bisect skip\"(或者运行脚本以特殊代码125退出),你可以得到这样的结果:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:388
......@@ -68809,19 +68807,19 @@ msgid ""
"e15b73ad3db9b48d7d1ade32f8cd23a751fe0ace\n"
"070eab2303024706f2924822bfec8b9847e4ac1b\n"
"We cannot bisect more!\n"
msgstr ""
msgstr "There are only 'skip'ped commits left to test.\nThe first bad commit could be any of:\n15722f2fa328eaba97022898a305ffc8172db6b1\n78e86cf3e850bd755bb71831f42e200626fbd1e0\ne15b73ad3db9b48d7d1ade32f8cd23a751fe0ace\n070eab2303024706f2924822bfec8b9847e4ac1b\nWe cannot bisect more!\n"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:391
#, no-wrap, priority:100
msgid "Saving a log and replaying it"
msgstr ""
msgstr "保存日志并重新展示"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:395
#, priority:100
msgid "If you want to show other people your bisection process, you can get a log using for example:"
msgstr ""
msgstr "如果你想向其他人展示你的查找过程,你可以用以下的示例得到一个日志:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:398
......@@ -68833,7 +68831,7 @@ msgstr "$ git bisect log > bisect_log.txt\n"
#: en/git-bisect-lk2009.txt:401
#, priority:100
msgid "And it is possible to replay it using:"
msgstr ""
msgstr "而且可以重新展示:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:404
......@@ -68851,49 +68849,49 @@ msgstr "\"git bisect\" details"
#: en/git-bisect-lk2009.txt:411
#, no-wrap, priority:100
msgid "Bisection algorithm"
msgstr ""
msgstr "二分算法"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:417
#, priority:100
msgid "As the Git commits form a directed acyclic graph (DAG), finding the best bisection commit to test at each step is not so simple. Anyway Linus found and implemented a \"truly stupid\" algorithm, later improved by Junio Hamano, that works quite well."
msgstr ""
msgstr "由于Git提交形成了一个有向无环图(DAG),在每一步找到最佳的分界提交来测试并不那么简单。不管怎样,Linus发现并实现了一种 \"非常傻瓜\"的算法,后来被Junio Hamano改进,效果相当好。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:420
#, priority:100
msgid "So the algorithm used by \"git bisect\" to find the best bisection commit when there are no skipped commits is the following:"
msgstr ""
msgstr "因此,当没有跳过的提交时,\"git bisect \"用来寻找最佳分界提交的算法如下:"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:422
#, priority:100
msgid "keep only the commits that:"
msgstr ""
msgstr "只保留以下的提交:"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:424
#, priority:100
msgid "are ancestor of the \"bad\" commit (including the \"bad\" commit itself),"
msgstr ""
msgstr "是\"坏 \"提交的祖先(包括 \"坏 \"提交本身),"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:425
#, priority:100
msgid "are not ancestor of a \"good\" commit (excluding the \"good\" commits)."
msgstr ""
msgstr "非\"好 \"提交的祖先(不包括 \"好 \"提交)。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:427
#, priority:100
msgid "This means that we get rid of the uninteresting commits in the DAG."
msgstr ""
msgstr "这意味着我们摆脱了DAG中无趣的提交。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:429
#, priority:100
msgid "For example if we start with a graph like this:"
msgstr ""
msgstr "例如,如果我们从一个这样的图开始:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:438
......@@ -68906,7 +68904,7 @@ msgid ""
"Y---G-W---W\n"
" \\ / \\\n"
"Y-Y X-X-X-X\n"
msgstr ""
msgstr "G-Y-G-W-W-W-X-X-X-X\n\t \\ /\n\t W-W-B\n\t /\nY---G-W---W\n \\ / \\\nY-Y X-X-X-X\n"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:440
......@@ -68918,7 +68916,7 @@ msgstr "-> 走这条路 ->\n"
#: en/git-bisect-lk2009.txt:445
#, priority:100
msgid "where B is the \"bad\" commit, \"G\" are \"good\" commits and W, X, and Y are other commits, we will get the following graph after this first step:"
msgstr ""
msgstr "其中B是 \"坏 \"的提交,\"G \"是 \"好 \"的提交,W、X、Y是其他的提交,经过这第一步,我们会得到以下的图:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:452
......@@ -68940,13 +68938,13 @@ msgstr ""
#: en/git-bisect-lk2009.txt:457
#, priority:100
msgid "So only the W and B commits will be kept. Because commits X and Y will have been removed by rules a) and b) respectively, and because commits G are removed by rule b) too."
msgstr ""
msgstr "所以只有W和B的提交会被保留。因为X和Y的提交将分别被规则a)和b)所删除,而且G的提交也被规则b)所删除。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:460
#, priority:100
msgid "Note for Git users, that it is equivalent as keeping only the commit given by:"
msgstr ""
msgstr "请注意,对于Git用户来说,这相当于只保留了所给的这些提交:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:463
......@@ -68958,7 +68956,7 @@ msgstr "git rev-list BAD --not GOOD1 GOOD2...\n"
#: en/git-bisect-lk2009.txt:468
#, priority:100
msgid "Also note that we don't require the commits that are kept to be descendants of a \"good\" commit. So in the following example, commits W and Z will be kept:"
msgstr ""
msgstr "另外请注意,我们并不要求被保留的提交必须是 \"好 \"提交的后代。所以在下面的例子中,W和Z的提交将被保留:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:473
......@@ -68967,19 +68965,19 @@ msgid ""
"G-W-W-W-B\n"
" /\n"
"Z-Z\n"
msgstr ""
msgstr "G-W-W-W-B\n /\nZ-Z\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:477
#, priority:100
msgid "starting from the \"good\" ends of the graph, associate to each commit the number of ancestors it has plus one"
msgstr ""
msgstr "从图中 \"好 \"的两端开始,将每个提交的祖先数量加上一个并与之相关联"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:480
#, priority:100
msgid "For example with the following graph where H is the \"bad\" commit and A and D are some parents of some \"good\" commits:"
msgstr ""
msgstr "例如,下图中H是 \"坏 \"的提交,A和D是一些 \"好 \"的提交的父提交:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:487
......@@ -68990,13 +68988,13 @@ msgid ""
" F-G-H\n"
" /\n"
"D---E\n"
msgstr ""
msgstr "A-B-C\n \\\n F-G-H\n /\nD---E\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:490
#, priority:100
msgid "this will give:"
msgstr ""
msgstr "这将给出:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:498
......@@ -69020,19 +69018,19 @@ msgstr ""
#: en/git-bisect-lk2009.txt:501
#, priority:100
msgid "associate to each commit: min(X, N - X)"
msgstr ""
msgstr "关联到每个提交: min(X, N - X)"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:504
#, priority:100
msgid "where X is the value associated to the commit in step 2) and N is the total number of commits in the graph."
msgstr ""
msgstr "其中X是与步骤2中的提交相关的数值,N是图中的提交总数。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:506
#, priority:100
msgid "In the above example we have N = 8, so this will give:"
msgstr ""
msgstr "在上面的例子中,我们有N=8,所以这将得到:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:514
......@@ -69056,43 +69054,43 @@ msgstr ""
#: en/git-bisect-lk2009.txt:518
#, priority:100
msgid "the best bisection point is the commit with the highest associated number"
msgstr ""
msgstr "最佳分界点是具有最高关联数的提交"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:520
#, priority:100
msgid "So in the above example the best bisection point is commit C."
msgstr ""
msgstr "所以在上面的例子中,最好的分界点是C。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:522
#, priority:100
msgid "note that some shortcuts are implemented to speed up the algorithm"
msgstr ""
msgstr "请注意,这里实施了一些快捷方式以加速算法"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:528
#, priority:100
msgid "As we know N from the beginning, we know that min(X, N - X) can't be greater than N/2. So during steps 2) and 3), if we would associate N/2 to a commit, then we know this is the best bisection point. So in this case we can just stop processing any other commit and return the current commit."
msgstr ""
msgstr "由于我们从一开始就知道N,所以知道min(X, N - X)不可能大于N/2。所以在步骤2)和3)中,如果我们将N/2与一个提交相关联,那么我们就知道这是一个最佳的分界点。所以在这种情况下,我们可以直接停止处理任何其他的提交,并返回当前的提交。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:530
#, no-wrap, priority:100
msgid "Bisection algorithm debugging"
msgstr ""
msgstr "二分法算法调试"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:534
#, priority:100
msgid "For any commit graph, you can see the number associated with each commit using \"git rev-list --bisect-all\"."
msgstr ""
msgstr "对于任何提交图,你可以用 \"git rev-list --bisect-all \"查看与每个提交相关的数字。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:536
#, priority:100
msgid "For example, for the above graph, a command like:"
msgstr ""
msgstr "例如,对于上面的图表,使用如下命令:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:539
......@@ -69104,7 +69102,7 @@ msgstr "$ git rev-list --bisect-all BAD --not GOOD1 GOOD2\n"
#: en/git-bisect-lk2009.txt:542
#, priority:100
msgid "would output something like:"
msgstr ""
msgstr "会输出类似的内容:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:552
......@@ -69118,139 +69116,139 @@ msgid ""
"a3864d4f32a3bf5ed177ddef598490a08760b70d (dist=1)\n"
"a41baa717dd74f1180abf55e9341bc7a0bb9d556 (dist=1)\n"
"9e622a6dad403b71c40979743bb9d5be17b16bd6 (dist=0)\n"
msgstr ""
msgstr "e15b73ad3db9b48d7d1ade32f8cd23a751fe0ace (dist=3)\n15722f2fa328eaba97022898a305ffc8172db6b1 (dist=2)\n78e86cf3e850bd755bb71831f42e200626fbd1e0 (dist=2)\na1939d9a142de972094af4dde9a544e577ddef0e (dist=2)\n070eab2303024706f2924822bfec8b9847e4ac1b (dist=1)\na3864d4f32a3bf5ed177ddef598490a08760b70d (dist=1)\na41baa717dd74f1180abf55e9341bc7a0bb9d556 (dist=1)\n9e622a6dad403b71c40979743bb9d5be17b16bd6 (dist=0)\n"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:555
#, no-wrap, priority:100
msgid "Bisection algorithm discussed"
msgstr ""
msgstr "讨论二分算法"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:561
#, priority:100
msgid "First let's define \"best bisection point\". We will say that a commit X is a best bisection point or a best bisection commit if knowing its state (\"good\" or \"bad\") gives as much information as possible whether the state of the commit happens to be \"good\" or \"bad\"."
msgstr ""
msgstr "首先让我们定义“最佳二分点”。如果知道一个提交的状态(“好”或“坏”)能尽可能多地提供提交状态是“好”还是“坏”的信息,我们就称它为最佳二分点或最佳二分提交。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:564
#, priority:100
msgid "This means that the best bisection commits are the commits where the following function is maximum:"
msgstr ""
msgstr "这意味着最好的二分提交是以下函数最大的提交:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:567
#, no-wrap, priority:100
msgid "f(X) = min(information_if_good(X), information_if_bad(X))\n"
msgstr ""
msgstr "f(X) = min(information_if_good(X), information_if_bad(X))\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:571
#, priority:100
msgid "where information_if_good(X) is the information we get if X is good and information_if_bad(X) is the information we get if X is bad."
msgstr ""
msgstr "其中information_if_good(X)是X好时我们获得的信息,information_if_bad(X)是X坏时我们得到的信息。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:580
#, priority:100
msgid "Now we will suppose that there is only one \"first bad commit\". This means that all its descendants are \"bad\" and all the other commits are \"good\". And we will suppose that all commits have an equal probability of being good or bad, or of being the first bad commit, so knowing the state of c commits gives always the same amount of information wherever these c commits are on the graph and whatever c is. (So we suppose that these commits being for example on a branch or near a good or a bad commit does not give more or less information)."
msgstr ""
msgstr "现在我们假设只有一次“第一次错误提交”。这意味着它的所有后代都是“坏的”,而所有其他提交都是“好的”。我们假设所有的提交都有相同的概率是好的或坏的,或者是第一个错误的提交,所以知道c提交的状态给出的信息总是相同的无论这些c提交在图上的哪个位置,无论c是什么。(所以我们假设这些提交是在一个分支上,或者在一个好的或坏的提交附近,不会给出更多或更少的信息)。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:582
#, priority:100
msgid "Let's also suppose that we have a cleaned up graph like one after step"
msgstr ""
msgstr "我们还假设我们有一个清理过的图表,例如一个步骤后"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:585
#, priority:100
msgid "in the bisection algorithm above. This means that we can measure the information we get in terms of number of commit we can remove from the graph.."
msgstr ""
msgstr "在上面的二分算法中。这意味着我们可以根据可以从图中删除的提交数量来衡量我们获得的信息。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:587
#, priority:100
msgid "And let's take a commit X in the graph."
msgstr ""
msgstr "让我们在图中提交一个 X。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:590
#, priority:100
msgid "If X is found to be \"good\", then we know that its ancestors are all \"good\", so we want to say that:"
msgstr ""
msgstr "如果发现X是“好”的,那么我们知道它的祖先都是“好”的,所以我们想说:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:593
#, no-wrap, priority:100
msgid "information_if_good(X) = number_of_ancestors(X) (TRUE)\n"
msgstr ""
msgstr "information_if_good(X) = number_of_ancestors(X) (TRUE)\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:597
#, priority:100
msgid "And this is true because at step 1) b) we remove the ancestors of the \"good\" commits."
msgstr ""
msgstr "这是真的,因为在步骤 1) b) 我们删除了“好”提交的祖先。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:600
#, priority:100
msgid "If X is found to be \"bad\", then we know that its descendants are all \"bad\", so we want to say that:"
msgstr ""
msgstr "如果发现 X 是“坏”的,那么我们知道它的后代都是“坏的”,所以我们想说:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:603
#, no-wrap, priority:100
msgid "information_if_bad(X) = number_of_descendants(X) (WRONG)\n"
msgstr ""
msgstr "information_if_bad(X) = number_of_descendants(X) (WRONG)\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:612
#, priority:100
msgid "But this is wrong because at step 1) a) we keep only the ancestors of the bad commit. So we get more information when a commit is marked as \"bad\", because we also know that the ancestors of the previous \"bad\" commit that are not ancestors of the new \"bad\" commit are not the first bad commit. We don't know if they are good or bad, but we know that they are not the first bad commit because they are not ancestor of the new \"bad\" commit."
msgstr ""
msgstr "但这是错误的,因为在步骤1)a)我们只保留错误承诺的祖先。因此,当提交被标记为“坏”时,我们会得到更多信息,因为我们也知道,不是新“坏”提交的祖先的上一个“坏”提交的祖先不是第一个错误提交。我们不知道它们是好是坏,但我们知道它们不是第一个错误提交,因为它们不是新“坏”提交的祖先。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:616
#, priority:100
msgid "So when a commit is marked as \"bad\" we know we can remove all the commits in the graph except those that are ancestors of the new \"bad\" commit. This means that:"
msgstr ""
msgstr "因此,当一个提交被标记为“坏”时,我们知道我们可以删除图形中的所有提交,除了那些是新“坏”提交的祖先。这意味着:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:619
#, no-wrap, priority:100
msgid "information_if_bad(X) = N - number_of_ancestors(X) (TRUE)\n"
msgstr ""
msgstr "information_if_bad(X) = N - number_of_ancestors(X) (TRUE)\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:622
#, priority:100
msgid "where N is the number of commits in the (cleaned up) graph."
msgstr ""
msgstr "其中 N 是(清理的)图中的提交数。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:625
#, priority:100
msgid "So in the end this means that to find the best bisection commits we should maximize the function:"
msgstr ""
msgstr "所以最后这意味着要找到最好的二分提交,我们应该最大化函数:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:628
#, no-wrap, priority:100
msgid "f(X) = min(number_of_ancestors(X), N - number_of_ancestors(X))\n"
msgstr ""
msgstr "f(X) = min(number_of_ancestors(X), N - number_of_ancestors(X))\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:632
#, priority:100
msgid "And this is nice because at step 2) we compute number_of_ancestors(X) and so at step 3) we compute f(X)."
msgstr ""
msgstr "这很好,因为在步骤2)我们计算number_of_ancestors(X),所以在步骤3)我们计算f(X)。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:634
#, priority:100
msgid "Let's take the following graph as an example:"
msgstr ""
msgstr "让我们以下图为例:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:641
......@@ -69261,25 +69259,25 @@ msgid ""
"A-B-C-D-E-F O\n"
" \\ /\n"
" K-L-M-N\n"
msgstr ""
msgstr " G-H-I-J\n / \\\nA-B-C-D-E-F O\n \\ /\n K-L-M-N\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:644
#, priority:100
msgid "If we compute the following non optimal function on it:"
msgstr ""
msgstr "如果我们在其上计算以下非最优函数:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:647
#, no-wrap, priority:100
msgid "g(X) = min(number_of_ancestors(X), number_of_descendants(X))\n"
msgstr ""
msgstr "g(X) = min(number_of_ancestors(X), number_of_descendants(X))\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:650
#, priority:100
msgid "we get:"
msgstr ""
msgstr "我们得到:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:659
......@@ -69292,13 +69290,13 @@ msgid ""
" \\ /\n"
" K-L-M-N\n"
" 4 3 2 1\n"
msgstr ""
msgstr " 4 3 2 1\n G-H-I-J\n1 2 3 4 5 6/ \\0\nA-B-C-D-E-F O\n \\ /\n K-L-M-N\n 4 3 2 1\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:662
#, priority:100
msgid "but with the algorithm used by git bisect we get:"
msgstr ""
msgstr "但是使用Git二分查找算法,我们得到:"
 
#. type: delimited block -
#: en/git-bisect-lk2009.txt:671
......@@ -69311,145 +69309,145 @@ msgid ""
" \\ /\n"
" K-L-M-N\n"
" 7 7 6 5\n"
msgstr ""
msgstr " 7 7 6 5\n G-H-I-J\n1 2 3 4 5 6/ \\0\nA-B-C-D-E-F O\n \\ /\n K-L-M-N\n 7 7 6 5\n"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:678
#, priority:100
msgid "So we chose G, H, K or L as the best bisection point, which is better than F. Because if for example L is bad, then we will know not only that L, M and N are bad but also that G, H, I and J are not the first bad commit (since we suppose that there is only one first bad commit and it must be an ancestor of L)."
msgstr ""
msgstr "因此,我们选择G、H、K或L作为最佳平分点,这比F更好。因为,如果L是坏的,那么我们不仅知道L、M和N是坏的,而且还知道G、H、I和J不是第一个坏提交(因为我们假设只有一个第一个坏提交,而且它必须是L的祖先)。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:681
#, priority:100
msgid "So the current algorithm seems to be the best possible given what we initially supposed."
msgstr ""
msgstr "因此,鉴于我们最初假设的算法,当前的算法似乎是最好的。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:683
#, no-wrap, priority:100
msgid "Skip algorithm"
msgstr ""
msgstr "跳过算法"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:688
#, priority:100
msgid "When some commits have been skipped (using \"git bisect skip\"), then the bisection algorithm is the same for step 1) to 3). But then we use roughly the following steps:"
msgstr ""
msgstr "当跳过一些提交(使用“git bisect skip”)时,步骤 1 到 3 的二分算法是相同的)。但是,让我们来使用以下步骤:"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:690
#, priority:100
msgid "sort the commit by decreasing associated value"
msgstr ""
msgstr "通过减少关联值对提交进行排序"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:693
#, priority:100
msgid "if the first commit has not been skipped, we can return it and stop here"
msgstr ""
msgstr "如果没有跳过第一次提交,我们可以返回它并在此处停止"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:695
#, priority:100
msgid "otherwise filter out all the skipped commits in the sorted list"
msgstr ""
msgstr "否则过滤掉排序列表中所有跳过的提交"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:698
#, priority:100
msgid "use a pseudo random number generator (PRNG) to generate a random number between 0 and 1"
msgstr ""
msgstr "使用伪随机数生成器 (PRNG) 生成介于 0 和 1 之间的随机数"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:701
#, priority:100
msgid "multiply this random number with its square root to bias it toward 0"
msgstr ""
msgstr "将此随机数与其平方根相乘,使其偏向 0"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:704
#, priority:100
msgid "multiply the result by the number of commits in the filtered list to get an index into this list"
msgstr ""
msgstr "将结果乘以过滤后的列表中的提交数量,得到该列表的索引"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:706
#, priority:100
msgid "return the commit at the computed index"
msgstr ""
msgstr "返回计算出的索引处的提交"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:708
#, no-wrap, priority:100
msgid "Skip algorithm discussed"
msgstr ""
msgstr "跳过算法讨论"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:715
#, priority:100
msgid "After step 7) (in the skip algorithm), we could check if the second commit has been skipped and return it if it is not the case. And in fact that was the algorithm we used from when \"git bisect skip\" was developed in Git version 1.5.4 (released on February 1st 2008) until Git version 1.6.4 (released July 29th 2009)."
msgstr ""
msgstr "在步骤7)(跳过算法中)之后,我们可以检查第二次提交是否已经被跳过,如果不是这样,则返回它。事实上,这就是我们从Git 1.5.4版本(2008年2月1日发布)开发 \"git bisect skip \"时开始使用的算法,直到Git 1.6.4版本(2009年7月29日发布)。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:721
#, priority:100
msgid "But Ingo Molnar and H. Peter Anvin (another well known linux kernel developer) both complained that sometimes the best bisection points all happened to be in an area where all the commits are untestable. And in this case the user was asked to test many untestable commits, which could be very inefficient."
msgstr ""
msgstr "但是Ingo Molnar和H. Peter Anvin(另一个著名的Linux内核开发者)都抱怨说,有时最好的分界点都碰巧在一个所有提交都无法测试的区域。而在这种情况下,用户被要求测试许多不可测试的提交,这可能是非常低效的。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:725
#, priority:100
msgid "Indeed untestable commits are often untestable because a breakage was introduced at one time, and that breakage was fixed only after many other commits were introduced."
msgstr ""
msgstr "事实上,不可测试的提交往往是因为某次引入了一个破绽,而这个破绽是在引入了许多其他的提交之后才被修复的。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:729
#, priority:100
msgid "This breakage is of course most of the time unrelated to the breakage we are trying to locate in the commit graph. But it prevents us to know if the interesting \"bad behavior\" is present or not."
msgstr ""
msgstr "当然,这种破坏在大多数时候与我们试图在提交图中定位的破坏无关。但它却让我们无法知道有趣的 \"坏行为 \"是否存在。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:733
#, priority:100
msgid "So it is a fact that commits near an untestable commit have a high probability of being untestable themselves. And the best bisection commits are often found together too (due to the bisection algorithm)."
msgstr ""
msgstr "因此,在不可测试的提交附近的提交,其本身也有很大可能是不可测试的。而且,最好的分界线提交也经常被发现在一起(由于二分算法的原因)。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:736
#, priority:100
msgid "This is why it is a bad idea to just chose the next best unskipped bisection commit when the first one has been skipped."
msgstr ""
msgstr "这就是为什么当第一个分界线被跳过时,直接选择下一个最好的未跳过的分界线提交是个坏主意。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:741
#, priority:100
msgid "We found that most commits on the graph may give quite a lot of information when they are tested. And the commits that will not on average give a lot of information are the one near the good and bad commits."
msgstr ""
msgstr "我们发现,图中的大多数提交在被测试时可能会提供相当多的信息。而那些平均来说不会提供大量信息的提交是靠近好的和坏的提交。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:744
#, priority:100
msgid "So using a PRNG with a bias to favor commits away from the good and bad commits looked like a good choice."
msgstr ""
msgstr "因此,使用一个有偏向性的PRNG来偏向于远离好的和坏的提交,看起来是一个不错的选择。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:751
#, priority:100
msgid "One obvious improvement to this algorithm would be to look for a commit that has an associated value near the one of the best bisection commit, and that is on another branch, before using the PRNG. Because if such a commit exists, then it is not very likely to be untestable too, so it will probably give more information than a nearly randomly chosen one."
msgstr ""
msgstr "这个算法的一个明显的改进是,在使用PRNG之前,寻找一个与最佳分叉提交的值接近的提交,而且是在另一个分支上。因为如果这样的提交存在,那么它也不太可能是不可测试的,所以它可能会比几乎随机选择的提交提供更多信息。"
 
#. type: Title ~
#: en/git-bisect-lk2009.txt:753
#, no-wrap, priority:100
msgid "Checking merge bases"
msgstr ""
msgstr "检查合并基数"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:757
#, priority:100
msgid "There is another tweak in the bisection algorithm that has not been described in the \"bisection algorithm\" above."
msgstr ""
msgstr "分割算法中还有一个调整,在上面的 \"二分算法 \"中没有描述。"
 
#. type: Plain text
#: en/git-bisect-lk2009.txt:761
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