git-2.22.0/tmp-objdir.c
/*
 * Make sure we copy packfiles and their associated metafiles in the correct
 * order. All of these ends_with checks are slightly expensive to do in
 * the midst of a sorting routine, but in practice it shouldn't matter.
 * We will have a relatively small number of packfiles to order, and loose
 * objects exit early in the first line.
 */
Make sure we copy packfiles and their associated metafiles in the correct
order. All of these ends_with checks are slightly expensive to do in
the midst of a sorting routine, but in practice it shouldn't matter.
We will have a relatively small number of packfiles to order, and loose
objects exit early in the first line.
Make sure we copy packfiles and their associated metafiles in the correct order . All of these ends_with checks are slightly expensive to do in the midst of a sorting routine but in practice it shouldn ' t matter . We will have a relatively small number of packfiles to order and loose objects exit early in the first line .
static int pack_copy_priority(const char *name)
{
	if (!starts_with(name, "pack"))
		return 0;
	if (ends_with(name, ".keep"))
		return 1;
	if (ends_with(name, ".pack"))
		return 2;
	if (ends_with(name, ".idx"))
		return 3;
	return 4;
}
static int pack_copy_priority ( const char * name ) { if ( ! starts_with ( name , " " ) ) return 0 ; if ( ends_with ( name , " " ) ) return 1 ; if ( ends_with ( name , " " ) ) return 2 ; if ( ends_with ( name , " " ) ) return 3 ; return 4 ; }
Make sure we copy packfiles and their associated metafiles in the correct
 order.
Make sure we copy packfiles and their associated metafiles in the correct order .