Staging
v0.5.1
Revision a153adf683d2b6e22c7e892ed8a161b140156186 authored by Petr Baudis on 24 October 2006, 00:39:14 UTC, committed by Junio C Hamano on 24 October 2006, 02:21:05 UTC
If the commit couldn't have been read, $/ wasn't restored to \n properly,
causing random havoc like git_get_ref_list() returning the ref names with
trailing \n.

Aside of potential confusion in the body of git_search(), no other $/
surprises are hopefully hidden in the code.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 83543a2
Raw File
update-server-info.c
#include "cache.h"

static const char update_server_info_usage[] =
"git-update-server-info [--force]";

int main(int ac, char **av)
{
	int i;
	int force = 0;
	for (i = 1; i < ac; i++) {
		if (av[i][0] == '-') {
			if (!strcmp("--force", av[i]) ||
			    !strcmp("-f", av[i]))
				force = 1;
			else
				usage(update_server_info_usage);
		}
	}
	if (i != ac)
		usage(update_server_info_usage);

	setup_git_directory();

	return !!update_server_info(force);
}
back to top