Revision a3cfb7f83f0e77a0e94716d08e2511084456c13e authored by Michael J Gruber on 21 March 2010, 17:30:18 UTC, committed by Junio C Hamano on 21 March 2010, 21:42:24 UTC
In urls.txt (which is included from git-{clone,fetch,push}.txt)
several item lists are surrounded by example block markers. This is
problematic for two reasons:

- None of these lists are example lists, so they should not be marked as
  such semantically.
- The html output looks weird (bulleted list with left sidebar).

Therefore, remove the example block markers. Output by the man backend
is unaffected.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent dddfb3f
Raw File
advice.c
#include "cache.h"

int advice_push_nonfastforward = 1;
int advice_status_hints = 1;
int advice_commit_before_merge = 1;

static struct {
	const char *name;
	int *preference;
} advice_config[] = {
	{ "pushnonfastforward", &advice_push_nonfastforward },
	{ "statushints", &advice_status_hints },
	{ "commitbeforemerge", &advice_commit_before_merge },
};

int git_default_advice_config(const char *var, const char *value)
{
	const char *k = skip_prefix(var, "advice.");
	int i;

	for (i = 0; i < ARRAY_SIZE(advice_config); i++) {
		if (strcmp(k, advice_config[i].name))
			continue;
		*advice_config[i].preference = git_config_bool(var, value);
		return 0;
	}

	return 0;
}
back to top