Staging
v0.5.1
https://github.com/git/git
Revision 23ea3e201cea0deea909569e08e950a9ec2345f7 authored by Junio C Hamano on 10 November 2005, 05:09:43 UTC, committed by Junio C Hamano on 10 November 2005, 05:09:43 UTC
Another snapshot, as slow and steady marth towards 1.0 continues.
Major changes include:

 - Jim Radford's RPM split.
 - Fredrik's recursive merge strategy is now default for two heads merge.
 - Yaacov's SVN importer updates.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2 parent s 5ca15b8 + a1c2929
Raw File
Tip revision: 23ea3e201cea0deea909569e08e950a9ec2345f7 authored by Junio C Hamano on 10 November 2005, 05:09:43 UTC
GIT 0.99.9g
Tip revision: 23ea3e2
show-index.c
#include "cache.h"

int main(int argc, char **argv)
{
	int i;
	unsigned nr;
	unsigned int entry[6];
	static unsigned int top_index[256];

	if (fread(top_index, sizeof(top_index), 1, stdin) != 1)
		die("unable to read idex");
	nr = 0;
	for (i = 0; i < 256; i++) {
		unsigned n = ntohl(top_index[i]);
		if (n < nr)
			die("corrupt index file");
		nr = n;
	}
	for (i = 0; i < nr; i++) {
		unsigned offset;

		if (fread(entry, 24, 1, stdin) != 1)
			die("unable to read entry %u/%u", i, nr);
		offset = ntohl(entry[0]);
		printf("%u %s\n", offset, sha1_to_hex((void *)(entry+1)));
	}
	return 0;
}
back to top