1

Let's assume I have N git projects, which combined together define a release/ repository R.

When R pass a sanity test, T, we name it a good R and if it fails we name it a bad R.

I want to come up with a script, and in the future push it to google repo, which generalizes the git bisect mechanism for a repository R defined by N git projects.

The aim is to find the latest good R named best R. VonC suggested a solution with submodules which is great but I am looking for a solution/algorithm for a repo-google based repository contains N git projects (e.g. Android).

0x90
  • 39,472
  • 36
  • 165
  • 245

1 Answers1

2

I don't think a special script is necessary at first:

If those N git repos are referenced together in a parent repo as submodules, you can go back in the history of that parent repo and get back all N repos as they were versioned at the time.

Apply your git-bisect on your parent repo, and make sure your test T take advantage of the sources of the N repos in N sub-directories of that main repo.

That won't be as precise as a bisect done directly in the faulty submodule, but it can certainly help narrowing the search.
As in this blog post, your test T might have to run a sub-git bisect in each submodules.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I have 2 kind of repositories, one is using submodules. and the second is stand alone git, wrapped with `repo`, only stand alone git with no connection between them (from version control perspective). – 0x90 Dec 28 '13 at 09:48
  • @0x90 I am not familiar enough with the `repo` tool to know how it keep trace of dependencies. But for any `git bisect` script to work over multiple repos, you need to have that dependency registered somehow (in order to apply the test to the right version of those repos). Submodules do that by design. – VonC Dec 28 '13 at 09:52
  • there is no dependency reflected in the git history. But passing the same test `T` 3 days ago can point for a common good `R`. thanks for the submodules solution I need it too. – 0x90 Dec 28 '13 at 09:57