~ubuntu-branches/ubuntu/intrepid/git-core/intrepid-updates

« back to all changes in this revision

Viewing changes to archive-zip.c

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-04-22 13:31:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20070422133105-xg8fnm18r2cxcbg1
Tags: upstream-1.5.1.2
ImportĀ upstreamĀ versionĀ 1.5.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright (c) 2006 Rene Scharfe
3
3
 */
4
 
#include <time.h>
5
4
#include "cache.h"
6
5
#include "commit.h"
7
6
#include "blob.h"
168
167
        int pathlen;
169
168
        unsigned char *out;
170
169
        char *path;
171
 
        char type[20];
 
170
        enum object_type type;
172
171
        void *buffer = NULL;
173
172
        void *deflated = NULL;
174
173
 
196
195
                if (S_ISREG(mode) && zlib_compression_level != 0)
197
196
                        method = 8;
198
197
                result = 0;
199
 
                buffer = read_sha1_file(sha1, type, &size);
 
198
                buffer = read_sha1_file(sha1, &type, &size);
200
199
                if (!buffer)
201
200
                        die("cannot read %s", sha1_to_hex(sha1));
202
201
                crc = crc32(crc, buffer, size);