From feefdf62c107fd63056becf547ea324dbb730e30 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Mon, 6 Jan 2014 00:00:58 +0000 Subject: shallow: remove unused code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 58babfff ("shallow.c: the 8 steps to select new commits for .git/shallow", 05-12-2013) added a function to implement step 5 of the quoted eight steps, namely 'remove_nonexistent_ours_in_pack()'. This function implements an optional optimization step in the new shallow commit selection algorithm. However, this function has no callers. (The commented out call sites would need to change, in order to provide information required by the function.) Signed-off-by: Ramsay Jones Acked-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- shallow.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'shallow.c') diff --git a/shallow.c b/shallow.c index c766fc301..e483780d4 100644 --- a/shallow.c +++ b/shallow.c @@ -359,22 +359,6 @@ void remove_nonexistent_theirs_shallow(struct shallow_info *info) info->nr_theirs = dst; } -/* Step 5, remove non-existent ones in "ours" in the pack */ -void remove_nonexistent_ours_in_pack(struct shallow_info *info, - struct packed_git *p) -{ - unsigned char (*sha1)[20] = info->shallow->sha1; - int i, dst; - trace_printf_key(TRACE_KEY, "shallow: remove_nonexistent_ours_in_pack\n"); - for (i = dst = 0; i < info->nr_ours; i++) { - if (i != dst) - info->ours[dst] = info->ours[i]; - if (find_pack_entry_one(sha1[info->ours[i]], p)) - dst++; - } - info->nr_ours = dst; -} - define_commit_slab(ref_bitmap, uint32_t *); struct paint_info { -- cgit v1.2.1