summaryrefslogtreecommitdiff
path: root/bisect.h
Commit message (Collapse)AuthorAgeFilesLines
* bisect: introduce support for --no-checkout option.Jon Seymour2011-08-041-1/+1
| | | | | | | | | | | | | | If --no-checkout is specified, then the bisection process uses: git update-ref --no-deref HEAD <trial> at each trial instead of: git checkout <trial> Improved-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* builtin-rev-list.c: mark file-local function staticJunio C Hamano2010-01-111-2/+0
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bisect: add parameters to "filter_skipped"Christian Couder2009-06-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | because we will need to get more information from this function in some later patches. The new "int *count" parameter gives the number of commits left after the skipped commit have been filtered out. The new "int *skipped_first" parameter tells us if the first commit in the list has been skipped. Note that using this parameter also changes the behavior of the function if the first commit is indeed skipped. Because we assume that in this case we will want all the filtered commits, not just the first one, even if "show_all" is not set. So using a not NULL "skipped_first" parameter really means that we plan to choose to test another commit than the first non skipped one if the first commit in the list is skipped. That in turn means that, in case the first commit is skipped, we have to return a fully filtered list. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bisect: make "git bisect" use new "--next-all" bisect-helper functionChristian Couder2009-05-101-1/+1
| | | | | | | | | | | | | | This patch replace the "--next-exit" option of "git bisect--helper" with a "--next-all" option that does merge base checking using the "check_good_are_ancestors_of_bad" function implemented in "bisect.c" in a former patch. The new "--next-all" option is then used in "git-bisect.sh" instead of the "--next-exit" option, and all the shell functions in "git-bisect.sh" that are now unused are removed. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-list: remove stringed output flag from "show_bisect_vars"Christian Couder2009-05-101-1/+0
| | | | | | | | Because it was used only by "git bisect--helper --next-vars" but the "--next-vars" option has been removed. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bisect--helper: remove "--next-vars" option as it is now uselessChristian Couder2009-05-101-1/+0
| | | | | | | Because it has been replaced by "--next-exit". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bisect--helper: add "--next-exit" to output bisect resultsChristian Couder2009-05-101-0/+1
| | | | | | | | | | | The goal of this patch is to port more shell code from the "bisect_next" function in "git-bisect.sh" to C code in "builtin-bisect--helper.c". So we port the code that interprets the bisection result and stops or continues (by checking out the next revision) the bisection process. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-list: refactor printing bisect varsChristian Couder2009-05-101-0/+4
| | | | | | | | This simplifies the code, and while at it we create the "print_commit_list" function that will be reused later. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-list: make "estimate_bisect_steps" non staticChristian Couder2009-05-101-0/+2
| | | | | | | Because it will be used from "bisect.c" too. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-list: add "int bisect_show_flags" in "struct rev_list_info"Christian Couder2009-04-071-3/+3
| | | | | | | | | This is a cleanup patch to make it easier to use the "show_bisect_vars" function and take advantage of the rev_list_info struct. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-list: remove last static vars used in "show_commit"Christian Couder2009-04-071-6/+8
| | | | | | | | | | | | | | | | | This patch removes the last static variables that were used in the "show_commit" function. To do that, we create a new "rev_list_info" struct that we will pass in the "void *data" argument to "show_commit". This means that we have to change the first argument to "show_bisect_vars" too. While at it, we also remove a "struct commit_list *list" variable in "cmd_rev_list" that is not really needed. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bisect--helper: string output variables together with "&&"Christian Couder2009-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | When doing: eval "git bisect--helper --next-vars" | { while read line do echo "$line &&" done echo ':' } the result code comes from the last "echo ':'", not from running "git bisect--helper --next-vars". This patch gets rid of the need to string together the line from the output of "git bisect--helper" with "&&" in the calling script by making "git bisect--helper --next-vars" return output variables already in that format. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-list: pass "int flags" as last argument of "show_bisect_vars"Christian Couder2009-04-051-2/+6
| | | | | | | | 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>
* bisect--helper: implement "git bisect--helper"Christian Couder2009-04-051-0/+7
| | | | | | | | | | | | | | | | | 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>
* rev-list: call new "filter_skip" functionChristian Couder2009-04-051-1/+5
| | | | | | | | | | | | 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>
* rev-list: pass "revs" to "show_bisect_vars"Christian Couder2009-03-301-1/+2
| | | | | | | instead of using static "revs" data Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-list: make "show_bisect_vars" non staticChristian Couder2009-03-301-0/+2
| | | | | | | | | | and declare it in "bisect.h" as we will use this function later. While at it, rename its last argument "show_all" instead of "bisect_find_all". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-list: move bisect related code into its own fileChristian Couder2009-03-301-0/+8
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>