如何仅在更改某个文件的提交上运行git bisect?

Max*_*kov 9 git git-bisect

我有一个很久以前就已经介绍过的bug了,测试它很痛苦.但是,我强烈怀疑引入该错误的更改发生在一个特定的源代码文件中.

我可以在更改该文件的提交子集上运行git bisect吗?

sil*_*vio 17

Yes you can ... In manpages you find this line:

git bisect start [--no-checkout] [<bad> [<good>...]] [--] [<paths>...]
Run Code Online (Sandbox Code Playgroud)

after two "-" you put the pathes of the files or directories.

example:

git bisect start -- arch/i386 include/asm-i386 or
Run Code Online (Sandbox Code Playgroud)