Commit 30aebe6334d5164ba58713d653d44b47632ee6d9

Vicent Marti 2014-01-14T12:40:30

Merge pull request #2048 from arthurschreiber/arthur/add-git_remote_dup Implement @cmn's suggestions for `git_remote_dup`.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/remote.c b/src/remote.c
index 6a4a707..622abbc 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -254,8 +254,6 @@ int git_remote_dup(git_remote **dest, const git_remote *source)
 	git_remote *remote = git__calloc(1, sizeof(git_remote));
 	GITERR_CHECK_ALLOC(remote);
 
-	memset(remote, 0x0, sizeof(git_remote));
-
 	if (source->name != NULL) {
 		remote->name = git__strdup(source->name);
 		GITERR_CHECK_ALLOC(remote->name);
@@ -272,7 +270,6 @@ int git_remote_dup(git_remote **dest, const git_remote *source)
 	}
 
 	remote->repo = source->repo;
-	remote->need_pack = source->need_pack;
 	remote->download_tags = source->download_tags;
 	remote->check_cert = source->check_cert;
 	remote->update_fetchhead = source->update_fetchhead;