是" git bisect log"保留所有州的信息?

时间:2015-09-30 15:21:47

标签: git git-bisect

动机

我正在做一个二分并考虑保存它的状态,然后可能继续它。我不清楚git bisect log是否可以做到这一点。

发布前搜索

man git bisect说:

  

Bisect log and bisect replay

     

将标记的修订标记为好或坏后,发出以下命令以显示到目前为止已完成的操作:

       $ git bisect log
     

如果您发现在指定修订的状态时出错,可以将此命令的输出保存到a   文件,编辑它          删除不正确的条目,然后发出以下命令以返回更正的状态:

       $ git bisect reset
       $ git bisect replay that-file

Fighting regressions with git bisect比较,这似乎更能表明答案是肯定的。

  

保存日志并重播

     

如果你想向别人展示你的二分法过程,你可以得到一个   记录使用例如:

$ git bisect log > bisect_log.txt
     

可以使用以下方式重播:

$ git bisect replay bisect_log.txt

实验

我刚做了一个实验,用git 1.9.0检查了这个。

tar zcvf git.tgz .git
git bisect log >bisectlog
git reset --hard
git bisect replay bisectlog

We are not bisecting.
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[somehash] Some commit log

tar zdf git.tgz

.git/BISECT_ANCESTORS_OK: Mod time differs
.git/BISECT_EXPECTED_REV: Mod time differs
.git/BISECT_LOG: Mod time differs
.git/BISECT_LOG: Size differs
.git/BISECT_NAMES: Mod time differs
.git/BISECT_START: Mod time differs
.git/HEAD: Mod time differs
.git/index: Mod time differs
.git/index: Contents differ
.git/logs/HEAD: Mod time differs
.git/logs/HEAD: Size differs
.git/ORIG_HEAD: Mod time differs
.git/ORIG_HEAD: Contents differ
.git/refs/bisect/bad: Mod time differs
.git/refs/bisect/good-0702dc7ec1d80d8ed38d7fe597dc0cce98ddccfc: Mod time differs
.git/refs/bisect/good-07357488ecac01085e6a5df1e4d44e00da4842e5: Mod time differs
.git/refs/bisect/good-5b753b5d63f16b60f5ccd6a954cf2f92e721af08: Mod time differs
.git/refs/bisect/good-5fac8a8900d5a27bbdf4bebd8b49cfef9757a4e3: Mod time differs
.git/refs/bisect/good-b2a73d5c02353589a81fb247255f78c41137299a: Mod time differs
.git/refs/bisect/good-f3f89511415bf386a6d4c815b92c9d3679a5e2eb: Mod time differs

git bisect log | diff - bisectlog

25a26
> # first bad commit: [someotherhash] Some other commit message

结论

因此,在重播后,git bisect log丢失了一行。

我说git bisect log包含大部分信息,但并非总是包含所有信息。

注意:用于此实验的二分法暗示了几次手动重置到其他提交,这可能解释了一些。

有人问过同样的问题吗?

是否应该关心缺失的线?

0 个答案:

没有答案