Staging
v0.7.0
Revision 8464010f974245b1e392d34ddbfb914fcf3d8c23 authored by David Steven Tweed on 07 February 2008, 02:55:14 UTC, committed by Junio C Hamano on 11 February 2008, 20:22:58 UTC
Write errors when repacking (eg, due to out-of-space conditions)
can leave temporary packs (and possibly other files beginning
with "tmp_") lying around which no existing
codepath removes and which aren't obvious to the casual user.
These can also be multi-megabyte files wasting noticeable space.
Unfortunately there's no way to definitely tell in builtin-prune
that a tmp_ file is not being used by a concurrent process,
such as a fetch. However, it is documented that pruning should
only be done on a quiet repository and --expire is honoured
(using code from Johannes Schindelin, along with a test case
he wrote) so that its safety is the same as that of loose
object pruning.

Since they might be signs of a problem (unlike orphaned loose
objects) the names of any removed files are printed.

Signed-off-by: David Tweed (david.tweed@gmail.com)
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 65ae89b
Raw File
patch-ids.h
#ifndef PATCH_IDS_H
#define PATCH_IDS_H

struct patch_id {
	unsigned char patch_id[20];
	char seen;
};

struct patch_ids {
	struct diff_options diffopts;
	int nr, alloc;
	struct patch_id **table;
	struct patch_id_bucket *patches;
};

int init_patch_ids(struct patch_ids *);
int free_patch_ids(struct patch_ids *);
struct patch_id *add_commit_patch_id(struct commit *, struct patch_ids *);
struct patch_id *has_commit_patch_id(struct commit *, struct patch_ids *);

#endif /* PATCH_IDS_H */
back to top