예제 #1
0
파일: bisect.c 프로젝트: Lekensteyn/git
static void handle_bad_merge_base(void)
{
	if (is_expected_rev(current_bad_oid)) {
		char *bad_hex = oid_to_hex(current_bad_oid);
		char *good_hex = join_sha1_array_hex(&good_revs, ' ');
		if (!strcmp(term_bad, "bad") && !strcmp(term_good, "good")) {
			fprintf(stderr, "The merge base %s is bad.\n"
				"This means the bug has been fixed "
				"between %s and [%s].\n",
				bad_hex, bad_hex, good_hex);
		} else if (!strcmp(term_bad, "new") && !strcmp(term_good, "old")) {
			fprintf(stderr, "The merge base %s is new.\n"
				"The property has changed "
				"between %s and [%s].\n",
				bad_hex, bad_hex, good_hex);
		} else {
			fprintf(stderr, "The merge base %s is %s.\n"
				"This means the first '%s' commit is "
				"between %s and [%s].\n",
				bad_hex, term_bad, term_good, bad_hex, good_hex);
		}
		exit(3);
	}

	fprintf(stderr, "Some %s revs are not ancestor of the %s rev.\n"
		"git bisect cannot work properly in this case.\n"
		"Maybe you mistook %s and %s revs?\n",
		term_good, term_bad, term_good, term_bad);
	exit(1);
}
예제 #2
0
파일: bisect--helper.c 프로젝트: bk2204/git
static void check_expected_revs(const char **revs, int rev_nr)
{
	int i;

	for (i = 0; i < rev_nr; i++) {
		if (!is_expected_rev(revs[i])) {
			unlink_or_warn(git_path_bisect_ancestors_ok());
			unlink_or_warn(git_path_bisect_expected_rev());
		}
	}
}
예제 #3
0
파일: bisect.c 프로젝트: 4rch17/git
static void handle_bad_merge_base(void)
{
	if (is_expected_rev(current_bad_sha1)) {
		char *bad_hex = sha1_to_hex(current_bad_sha1);
		char *good_hex = join_sha1_array_hex(&good_revs, ' ');

		fprintf(stderr, "The merge base %s is bad.\n"
			"This means the bug has been fixed "
			"between %s and [%s].\n",
			bad_hex, bad_hex, good_hex);

		exit(3);
	}

	fprintf(stderr, "Some good revs are not ancestor of the bad rev.\n"
		"git bisect cannot work properly in this case.\n"
		"Maybe you mistake good and bad revs?\n");
	exit(1);
}