Exemple #1
0
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);
}
Exemple #2
0
static void handle_skipped_merge_base(const unsigned char *mb)
{
	char *mb_hex = sha1_to_hex(mb);
	char *bad_hex = sha1_to_hex(current_bad_oid->hash);
	char *good_hex = join_sha1_array_hex(&good_revs, ' ');

	warning("the merge base between %s and [%s] "
		"must be skipped.\n"
		"So we cannot be sure the first %s commit is "
		"between %s and %s.\n"
		"We continue anyway.",
		bad_hex, good_hex, term_bad, mb_hex, bad_hex);
	free(good_hex);
}
Exemple #3
0
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);
}