Staging
v0.5.2
https://github.com/git/git
Revision 83ee94c12ca16ef020f3d71eda34b6559ed6dc67 authored by Junio C Hamano on 08 November 2006, 06:37:17 UTC, committed by Junio C Hamano on 08 November 2006, 06:42:05 UTC
A forked project is defined to be $projname/$forkname.git for
$projname.git; the code did not check this correctly and mistook
$projname/.git to be a fork of itself.  This minimally fixes the
breakage.

Also forks were not checked when index.aux file was in use.
Listing the forked ones in index.aux would show them also on the
toplevel index which may go against the hierarchical nature of
forks, but again this is a minimal fix to whip it in a better
shape suitable to be in the 'master' branch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 5dd5ed0
Raw File
Tip revision: 83ee94c12ca16ef020f3d71eda34b6559ed6dc67 authored by Junio C Hamano on 08 November 2006, 06:37:17 UTC
gitweb: minimally fix "fork" support.
Tip revision: 83ee94c
check-racy.c
#include "cache.h"

int main(int ac, char **av)
{
	int i;
	int dirty, clean, racy;

	dirty = clean = racy = 0;
	read_cache();
	for (i = 0; i < active_nr; i++) {
		struct cache_entry *ce = active_cache[i];
		struct stat st;

		if (lstat(ce->name, &st)) {
			error("lstat(%s): %s", ce->name, strerror(errno));
			continue;
		}

		if (ce_match_stat(ce, &st, 0))
			dirty++;
		else if (ce_match_stat(ce, &st, 2))
			racy++;
		else
			clean++;
	}
	printf("dirty %d, clean %d, racy %d\n", dirty, clean, racy);
	return 0;
}
back to top