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
get-tar-commit-id.c
/*
 * Copyright (C) 2005 Rene Scharfe
 */
#include <stdio.h>
#include <string.h>
#include <unistd.h>

#define HEADERSIZE	1024

int main(int argc, char **argv)
{
	char buffer[HEADERSIZE];
	ssize_t n;

	n = read(0, buffer, HEADERSIZE);
	if (n < HEADERSIZE) {
		fprintf(stderr, "read error\n");
		return 3;
	}
	if (buffer[156] != 'g')
		return 1;
	if (memcmp(&buffer[512], "52 comment=", 11))
		return 1;
	n = write(1, &buffer[523], 41);
	if (n < 41) {
		fprintf(stderr, "write error\n");
		return 2;
	}
	return 0;
}
back to top