X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=inline;f=commit.c;h=97b43279cdf46159462d5f56abc20f2161f4c7ea;hb=57c081046c2885393858f31fc0e47d9c7545d051;hp=246cd18b0eb6306e8142ae349ddfd753c2c656a1;hpb=09d46644b780ede1a6b757db3e1a1ae9c1128a13;p=git.git diff --git a/commit.c b/commit.c index 246cd18b0..97b43279c 100644 --- a/commit.c +++ b/commit.c @@ -222,24 +222,6 @@ int for_each_commit_graft(each_commit_graft_fn fn, void *cb_data) return ret; } -int write_shallow_commits(struct strbuf *out, int use_pack_protocol) -{ - int i, count = 0; - for (i = 0; i < commit_graft_nr; i++) - if (commit_graft[i]->nr_parent < 0) { - const char *hex = - sha1_to_hex(commit_graft[i]->sha1); - count++; - if (use_pack_protocol) - packet_buf_write(out, "shallow %s", hex); - else { - strbuf_addstr(out, hex); - strbuf_addch(out, '\n'); - } - } - return count; -} - int unregister_shallow(const unsigned char *sha1) { int pos = commit_graft_pos(sha1); @@ -523,7 +505,7 @@ void sort_in_topological_order(struct commit_list ** list, int lifo) commit = work_item->item; for (parents = commit->parents; parents ; parents = parents->next) { - struct commit *parent=parents->item; + struct commit *parent = parents->item; if (!parent->indegree) continue;