diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-07-22 11:24:05 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-22 11:24:05 -0700 |
commit | 4c72ee838f1085a47a3c5144ce1088f1bca42f66 (patch) | |
tree | 373153f7a0c505521a94de9654ccb86f10e97480 /shallow.c | |
parent | a0c1aa216130680f890ded9e057bae24b0610d98 (diff) | |
parent | 4b796951ffca7c0aa9e05d62d6d16a3c689b7f25 (diff) | |
download | git-4c72ee838f1085a47a3c5144ce1088f1bca42f66.tar.gz |
Merge branch 'mk/upload-pack-off-by-one-dead-code-removal'
* mk/upload-pack-off-by-one-dead-code-removal:
upload-pack: remove a piece of dead code
Diffstat (limited to 'shallow.c')
-rw-r--r-- | shallow.c | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -110,17 +110,12 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth, continue; *pointer = cur_depth; } - if (cur_depth < depth) { - if (p->next) - add_object_array(&p->item->object, - NULL, &stack); - else { - commit = p->item; - cur_depth = *(int *)commit->util; - } - } else { - commit_list_insert(p->item, &result); - p->item->object.flags |= shallow_flag; + if (p->next) + add_object_array(&p->item->object, + NULL, &stack); + else { + commit = p->item; + cur_depth = *(int *)commit->util; } } } |