diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-09-09 20:58:01 +0700 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2013-09-13 21:00:29 -0400 |
commit | 1942a6ec839782a87baf052dc79fca000190f815 (patch) | |
tree | 136a9a707e91b6fd2aa4faa0ea6d120b0f846dfc | |
parent | 4ef12574e1d88b23539a32efc6806bbff0021463 (diff) | |
download | git-1942a6ec839782a87baf052dc79fca000190f815.tar.gz |
pack-objects: exclude commits out of delta objects in v4
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
-rw-r--r-- | builtin/pack-objects.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 9613732e27..fb2394d813 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -1329,7 +1329,8 @@ static void check_object(struct object_entry *entry) break; } - if (base_ref && (base_entry = locate_object_entry(base_ref))) { + if (base_ref && (base_entry = locate_object_entry(base_ref)) && + (pack_version < 4 || entry->type != OBJ_COMMIT)) { /* * If base_ref was set above that means we wish to * reuse delta data, and we even found that base @@ -1413,6 +1414,8 @@ static void get_object_details(void) check_object(entry); if (big_file_threshold < entry->size) entry->no_try_delta = 1; + if (pack_version == 4 && entry->type == OBJ_COMMIT) + entry->no_try_delta = 1; } free(sorted_by_offset); |