From ef635b9056e23c06b4b5bcb4de294c1f6d9dda24 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sun, 12 Jun 2016 17:53:47 +0700 Subject: [PATCH] upload-pack: remove unused variable "backup" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit After the last patch, "result" and "backup" are the same. "result" used to move, but the movement is now contained in send_shallow(). Delete this redundant variable. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- upload-pack.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index 0eb9a0b8f..ee5d20b80 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -554,7 +554,7 @@ static void send_shallow(struct commit_list *result) static void deepen(int depth, const struct object_array *shallows) { - struct commit_list *result = NULL, *backup = NULL; + struct commit_list *result = NULL; int i; if (depth == INFINITE_DEPTH && !is_repository_shallow()) for (i = 0; i < shallows->nr; i++) { @@ -562,11 +562,10 @@ static void deepen(int depth, const struct object_array *shallows) object->flags |= NOT_SHALLOW; } else - backup = result = - get_shallow_commits(&want_obj, depth, - SHALLOW, NOT_SHALLOW); + result = get_shallow_commits(&want_obj, depth, + SHALLOW, NOT_SHALLOW); send_shallow(result); - free_commit_list(backup); + free_commit_list(result); for (i = 0; i < shallows->nr; i++) { struct object *object = shallows->objects[i].item; if (object->flags & NOT_SHALLOW) { -- 2.11.0