diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2012-05-16 19:02:10 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-18 14:22:15 -0700 |
commit | c9018b0305a56436c85b292edbeacff04b0ebb5d (patch) | |
tree | a95afbde202beeb0f53cb0ffc1182a2e3fd9547b /ppc/sha1ppc.S | |
parent | pack-objects, streaming: turn "xx >= big_file_threshold" to ".. > .." (diff) | |
download | tgif-c9018b0305a56436c85b292edbeacff04b0ebb5d.tar.xz |
pack-objects: refactor write_object() into helper functions
The function first decides if we want to copy data taken from existing
pack verbatim or we want to encode the data ourselves for the packfile
we are creating and then carries out the decision. Separate the latter
phase into two helper functions, one for the case the data is reused,
the other for the case the data is produced anew.
A little twist is that it can later turn out that we cannot reuse the
data after we initially decide to do so; in such a case, the "reuse"
helper makes a call to "generate" helper. It is easier to follow than
the current fallback code that uses "goto" inside a single large
function.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ppc/sha1ppc.S')
0 files changed, 0 insertions, 0 deletions