Skip to content

Commit ef635b9

Browse files
pcloudsgitster
authored andcommitted
upload-pack: remove unused variable "backup"
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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 5c24cde commit ef635b9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

upload-pack.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -554,19 +554,18 @@ static void send_shallow(struct commit_list *result)
554554

555555
static void deepen(int depth, const struct object_array *shallows)
556556
{
557-
struct commit_list *result = NULL, *backup = NULL;
557+
struct commit_list *result = NULL;
558558
int i;
559559
if (depth == INFINITE_DEPTH && !is_repository_shallow())
560560
for (i = 0; i < shallows->nr; i++) {
561561
struct object *object = shallows->objects[i].item;
562562
object->flags |= NOT_SHALLOW;
563563
}
564564
else
565-
backup = result =
566-
get_shallow_commits(&want_obj, depth,
567-
SHALLOW, NOT_SHALLOW);
565+
result = get_shallow_commits(&want_obj, depth,
566+
SHALLOW, NOT_SHALLOW);
568567
send_shallow(result);
569-
free_commit_list(backup);
568+
free_commit_list(result);
570569
for (i = 0; i < shallows->nr; i++) {
571570
struct object *object = shallows->objects[i].item;
572571
if (object->flags & NOT_SHALLOW) {

0 commit comments

Comments
 (0)