Revision 5e626b91d4a5d2cfee8747facd53d7661f1f9112 authored by Junio C Hamano on 30 October 2014, 17:45:41 UTC, committed by Junio C Hamano on 30 October 2014, 21:45:52 UTC
The create_bundle() function, while it does one single logical
thing, takes a rather large implementation to do so.

Let's start separating what it does into smaller steps to make it
easier to see what is going on.  This is a first step to separate
out the actual pack-data generation, after the earlier part of the
function figures out which part of the history to place in the
bundle.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 8828f29
Raw File
strlcpy.c
#include "../git-compat-util.h"

size_t gitstrlcpy(char *dest, const char *src, size_t size)
{
	size_t ret = strlen(src);

	if (size) {
		size_t len = (ret >= size) ? size - 1 : ret;
		memcpy(dest, src, len);
		dest[len] = '\0';
	}
	return ret;
}
back to top