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

« back to all changes in this revision

Viewing changes to builtin-rev-list.c

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-10-04 08:27:01 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20071004082701-rsd058ontoqz4i30
Tags: 1:1.5.3.4-1
new upstream point release (closes: #445188).

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
        if (revs.parents) {
71
71
                struct commit_list *parents = commit->parents;
72
72
                while (parents) {
73
 
                        struct object *o = &(parents->item->object);
 
73
                        printf(" %s", sha1_to_hex(parents->item->object.sha1));
74
74
                        parents = parents->next;
75
 
                        if (o->flags & TMP_MARK)
76
 
                                continue;
77
 
                        printf(" %s", sha1_to_hex(o->sha1));
78
 
                        o->flags |= TMP_MARK;
79
75
                }
80
 
                /* TMP_MARK is a general purpose flag that can
81
 
                 * be used locally, but the user should clean
82
 
                 * things up after it is done with them.
83
 
                 */
84
 
                for (parents = commit->parents;
85
 
                     parents;
86
 
                     parents = parents->next)
87
 
                        parents->item->object.flags &= ~TMP_MARK;
88
76
        }
89
77
        if (revs.commit_format == CMIT_FMT_ONELINE)
90
78
                putchar(' ');
92
80
                putchar('\n');
93
81
 
94
82
        if (revs.verbose_header) {
95
 
                static char pretty_header[16384];
 
83
                char *buf = NULL;
 
84
                unsigned long buflen = 0;
96
85
                pretty_print_commit(revs.commit_format, commit, ~0,
97
 
                                    pretty_header, sizeof(pretty_header),
 
86
                                    &buf, &buflen,
98
87
                                    revs.abbrev, NULL, NULL, revs.date_mode);
99
 
                printf("%s%c", pretty_header, hdr_termination);
 
88
                printf("%s%c", buf, hdr_termination);
 
89
                free(buf);
100
90
        }
101
 
        fflush(stdout);
 
91
        maybe_flush_or_die(stdout, "stdout");
102
92
        if (commit->parents) {
103
93
                free_commit_list(commit->parents);
104
94
                commit->parents = NULL;