aboutsummaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-07-23 11:35:54 -0700
committerJunio C Hamano <gitster@pobox.com>2014-07-23 11:35:54 -0700
commit955d7be808b455cdf2eb60306a690958c3bb49ca (patch)
tree5dd47421f110812148213e64446361ac0656240a /transport.c
parentbc88defa2f9f92324106dca48126039246ab00e1 (diff)
parentf93d7c6fa0548e95ca2795d900671a87c1a88ea3 (diff)
downloadgit-955d7be808b455cdf2eb60306a690958c3bb49ca.tar.gz
git-955d7be808b455cdf2eb60306a690958c3bb49ca.tar.xz
Merge branch 'ta/string-list-init'
* ta/string-list-init: replace memset with string-list initializers string-list: add string_list initializer helper function
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/transport.c b/transport.c
index 3e425709f..80ed1262c 100644
--- a/transport.c
+++ b/transport.c
@@ -1176,10 +1176,8 @@ int transport_push(struct transport *transport,
if ((flags & (TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND |
TRANSPORT_RECURSE_SUBMODULES_CHECK)) && !is_bare_repository()) {
struct ref *ref = remote_refs;
- struct string_list needs_pushing;
+ struct string_list needs_pushing = STRING_LIST_INIT_DUP;
- memset(&needs_pushing, 0, sizeof(struct string_list));
- needs_pushing.strdup_strings = 1;
for (; ref; ref = ref->next)
if (!is_null_sha1(ref->new_sha1) &&
find_unpushed_submodules(ref->new_sha1,