Commit 30aebe63 by Vicent Marti

Merge pull request #2048 from arthurschreiber/arthur/add-git_remote_dup

Implement @cmn's suggestions for `git_remote_dup`.
parents 76c00ead 99dcb218
...@@ -254,8 +254,6 @@ int git_remote_dup(git_remote **dest, const git_remote *source) ...@@ -254,8 +254,6 @@ int git_remote_dup(git_remote **dest, const git_remote *source)
git_remote *remote = git__calloc(1, sizeof(git_remote)); git_remote *remote = git__calloc(1, sizeof(git_remote));
GITERR_CHECK_ALLOC(remote); GITERR_CHECK_ALLOC(remote);
memset(remote, 0x0, sizeof(git_remote));
if (source->name != NULL) { if (source->name != NULL) {
remote->name = git__strdup(source->name); remote->name = git__strdup(source->name);
GITERR_CHECK_ALLOC(remote->name); GITERR_CHECK_ALLOC(remote->name);
...@@ -272,7 +270,6 @@ int git_remote_dup(git_remote **dest, const git_remote *source) ...@@ -272,7 +270,6 @@ int git_remote_dup(git_remote **dest, const git_remote *source)
} }
remote->repo = source->repo; remote->repo = source->repo;
remote->need_pack = source->need_pack;
remote->download_tags = source->download_tags; remote->download_tags = source->download_tags;
remote->check_cert = source->check_cert; remote->check_cert = source->check_cert;
remote->update_fetchhead = source->update_fetchhead; remote->update_fetchhead = source->update_fetchhead;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment