diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-07-23 20:35:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-23 20:35:54 +0200 |
commit | 955d7be808b455cdf2eb60306a690958c3bb49ca (patch) | |
tree | 5dd47421f110812148213e64446361ac0656240a /transport.c | |
parent | Merge branch 'mb/local-clone-after-applying-insteadof' (diff) | |
parent | replace memset with string-list initializers (diff) | |
download | git-955d7be808b455cdf2eb60306a690958c3bb49ca.tar.xz git-955d7be808b455cdf2eb60306a690958c3bb49ca.zip |
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.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/transport.c b/transport.c index 3e425709fd..80ed1262c2 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, |