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

« back to all changes in this revision

Viewing changes to builtin-tar-tree.c

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-04-22 13:31:05 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20070422133105-tkmhz328g2p0epz1
Tags: 1:1.5.1.2-1
* new upstream point release.
* debian/changelog.upstream: upstream changes taken from mailing list
  announcement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright (c) 2005, 2006 Rene Scharfe
3
3
 */
4
 
#include <time.h>
5
4
#include "cache.h"
6
5
#include "commit.h"
7
6
#include "tar.h"
32
31
        nargv[nargc++] = "git-archive";
33
32
        nargv[nargc++] = "--format=tar";
34
33
 
35
 
        if (2 <= argc && !strncmp("--remote=", argv[1], 9)) {
 
34
        if (2 <= argc && !prefixcmp(argv[1], "--remote=")) {
36
35
                nargv[nargc++] = argv[1];
37
36
                argv++;
38
37
                argc--;
75
74
        char *content = buffer + RECORDSIZE;
76
75
        ssize_t n;
77
76
 
78
 
        n = xread(0, buffer, HEADERSIZE);
 
77
        n = read_in_full(0, buffer, HEADERSIZE);
79
78
        if (n < HEADERSIZE)
80
79
                die("git-get-tar-commit-id: read error");
81
80
        if (header->typeflag[0] != 'g')
83
82
        if (memcmp(content, "52 comment=", 11))
84
83
                return 1;
85
84
 
86
 
        n = xwrite(1, content + 11, 41);
 
85
        n = write_in_full(1, content + 11, 41);
87
86
        if (n < 41)
88
87
                die("git-get-tar-commit-id: write error");
89
88