summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d25931)
raw | patch | inline | side by side (parent: 8d25931)
author | Brandon Casey <casey@nrlssc.navy.mil> | |
Wed, 12 Nov 2008 17:59:04 +0000 (11:59 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 Nov 2008 18:28:10 +0000 (10:28 -0800) |
This adds a new option to pack-objects which will cause it to ignore an
object which appears in a local pack which has a .keep file, even if it
was specified for packing.
This option will be used by the porcelain repack.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
object which appears in a local pack which has a .keep file, even if it
was specified for packing.
This option will be used by the porcelain repack.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-pack-objects.txt | patch | blob | history | |
builtin-pack-objects.c | patch | blob | history |
index 8c354bd47014825de71243d73158b6b080ecb350..f9fac2ccf914a186b156027d08979d11415b1f9b 100644 (file)
The default is unlimited, unless the config variable
`pack.packSizeLimit` is set.
+--honor-pack-keep::
+ This flag causes an object already in a local pack that
+ has a .keep file to be ignored, even if it appears in the
+ standard input.
+
--incremental::
This flag causes an object already in a pack ignored
even if it appears in the standard input.
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index b0dddbee4f93de462090218554e1b1b6d1038c34..29c00474d67897e0117301f504f02660333e5919 100644 (file)
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
static int keep_unreachable, unpack_unreachable, include_tag;
static int local;
static int incremental;
+static int ignore_packed_keep;
static int allow_ofs_delta;
static const char *base_name;
static int progress = 1;
return 0;
if (local && !p->pack_local)
return 0;
+ if (ignore_packed_keep && p->pack_local && p->pack_keep)
+ return 0;
}
}
incremental = 1;
continue;
}
+ if (!strcmp("--honor-pack-keep", arg)) {
+ ignore_packed_keep = 1;
+ continue;
+ }
if (!prefixcmp(arg, "--compression=")) {
char *end;
int level = strtoul(arg+14, &end, 0);