Theoretical Analysis of git bisect

3Citations
Citations of this article
N/AReaders
Mendeley users who have this article in their library.
Get full text

Abstract

In this paper, we consider the problem of finding a regression in a version control system (VCS), such as git. The set of versions is modelled by a Directed Acyclic Graph (DAG) where vertices represent versions of the software, and arcs are the changes between different versions. We assume that somewhere in the DAG, a bug was introduced, which persists in all of its subsequent versions. It is possible to query a vertex to check whether the corresponding version carries the bug. Given a DAG and a bugged vertex, the Regression Search Problem consists in finding the first vertex containing the bug in a minimum number of queries in the worst-case scenario. This problem is known to be NP-hard. We study the algorithm used in git to address this problem, known as git bisect. We prove that in a general setting, git bisect can use an exponentially larger number of queries than an optimal algorithm. We also consider the restriction where all vertices have indegree at most 2 (i.e. where merges are made between at most two branches at a time in the VCS), and prove that in this case, git bisect is a 1log2(3/2) -approximation algorithm, and that this bound is tight. We also provide a better approximation algorithm for this case.

Cite

CITATION STYLE

APA

Courtiel, J., Dorbec, P., & Lecoq, R. (2022). Theoretical Analysis of git bisect. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 13568 LNCS, pp. 157–171). Springer Science and Business Media Deutschland GmbH. https://doi.org/10.1007/978-3-031-20624-5_10

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free