Commit graph

56 commits

Author SHA1 Message Date
Christian Couder 37c4c38d73 rev-list: pass "int flags" as last argument of "show_bisect_vars"
Instead of "int show_all, int show_tried" we now only pass "int flags",
because we will add one more flag in a later patch.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-05 01:29:45 -07:00
Christian Couder 3b437b0dab bisect: implement "read_bisect_paths" to read paths in "$GIT_DIR/BISECT_NAMES"
This is needed because  "git bisect--helper" must read bisect paths
in "$GIT_DIR/BISECT_NAMES", so that a bisection can be performed only
on commits that touches paths in this file.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-05 01:29:44 -07:00
Christian Couder 1bf072e366 bisect--helper: implement "git bisect--helper"
This patch implements a new "git bisect--helper" builtin plumbing
command that will be used to migrate "git-bisect.sh" to C.

We start by implementing only the "--next-vars" option that will
read bisect refs from "refs/bisect/", and then compute the next
bisect step, and output shell variables ready to be eval'ed by
the shell.

At this step, "git bisect--helper" ignores the paths that may
have been put in "$GIT_DIR/BISECT_NAMES". This will be fixed in a
later patch.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-05 01:29:44 -07:00
Christian Couder 4eb5b64631 bisect: use the new generic "sha1_pos" function to lookup sha1
instead of the specific one that was simpler but less efficient.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-05 01:29:44 -07:00
Christian Couder 9518864816 rev-list: call new "filter_skip" function
This patch implements a new "filter_skip" function in C in
"bisect.c" that will later replace the existing implementation in
shell in "git-bisect.sh".

An array is used to store the skipped commits. But the array is
not yet fed anything.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-05 01:29:35 -07:00
Christian Couder a2ad79ced2 rev-list: move bisect related code into its own file
This patch creates new "bisect.c" and "bisect.h" files and move
bisect related code into these files.

While at it, we also remove some include directives that are not
needed any more from the beginning of "builtin-rev-list.c".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-30 01:22:54 -07:00