Staging
v0.5.1
https://github.com/git/git
Revision 87ce294c9129879f717f8749cae1c659e18a3823 authored by Junio C Hamano on 05 November 2005, 19:50:24 UTC, committed by Junio C Hamano on 05 November 2005, 19:50:24 UTC
This is primarily to include the 'git clone -l' (without -s) fix,
first spotted and diagnosed by Linus and caused James Bottomley's
repository to become unreadable.  It also contains documentation
updates happened on the "master" branch since 0.99.9c

Signed-off-by: Junio C Hamano <junkio@cox.net>
2 parent s 6ddc096 + 3d95bf0
Raw File
Tip revision: 87ce294c9129879f717f8749cae1c659e18a3823 authored by Junio C Hamano on 05 November 2005, 19:50:24 UTC
GIT 0.99.9d
Tip revision: 87ce294
delta.h
#ifndef DELTA_H
#define DELTA_H

/* handling of delta buffers */
extern void *diff_delta(void *from_buf, unsigned long from_size,
			void *to_buf, unsigned long to_size,
		        unsigned long *delta_size, unsigned long max_size);
extern void *patch_delta(void *src_buf, unsigned long src_size,
			 void *delta_buf, unsigned long delta_size,
			 unsigned long *dst_size);

/* the smallest possible delta size is 4 bytes */
#define DELTA_SIZE_MIN	4

/*
 * This must be called twice on the delta data buffer, first to get the
 * expected reference buffer size, and again to get the result buffer size.
 */
static inline unsigned long get_delta_hdr_size(const unsigned char **datap)
{
	const unsigned char *data = *datap;
	unsigned char cmd = *data++;
	unsigned long size = cmd & ~0x80;
	int i = 7;
	while (cmd & 0x80) {
		cmd = *data++;
		size |= (cmd & ~0x80) << i;
		i += 7;
	}
	*datap = data;
	return size;
}

#endif
back to top