Simplify is_kept_pack()

This removes --unpacked=<packfile> parameter from the revision parser, and
rewrites its use in git-repack to pass a single --kept-pack-only option
instead.

The new --kept-pack-only option means just that.  When this option is
given, is_kept_pack() that used to say "not on the --unpacked=<packfile>
list" now says "the packfile has corresponding .keep file".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2009-02-28 00:00:21 -08:00
parent 386cb77210
commit 03a9683d22
5 changed files with 18 additions and 51 deletions

View File

@ -47,7 +47,8 @@ struct rev_info {
blob_objects:1,
edge_hint:1,
limited:1,
unpacked:1, /* see also ignore_packed below */
unpacked:1,
kept_pack_only:1,
boundary:2,
left_right:1,
rewrite_parents:1,
@ -75,9 +76,6 @@ struct rev_info {
missing_newline:1;
enum date_mode date_mode;
const char **ignore_packed; /* pretend objects in these are unpacked */
int num_ignore_packed;
unsigned int abbrev;
enum cmit_fmt commit_format;
struct log_info *loginfo;
@ -159,6 +157,6 @@ enum commit_action {
extern enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit);
extern int has_sha1_kept_pack(const unsigned char *sha1, const struct rev_info *);
extern int is_kept_pack(const struct packed_git *, const struct rev_info *);
extern int is_kept_pack(const struct packed_git *);
#endif