summaryrefslogtreecommitdiff
path: root/submodule.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 /submodule.c
parentbc88defa2f9f92324106dca48126039246ab00e1 (diff)
parentf93d7c6fa0548e95ca2795d900671a87c1a88ea3 (diff)
downloadgit-955d7be808b455cdf2eb60306a690958c3bb49ca.tar.gz
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 'submodule.c')
-rw-r--r--submodule.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/submodule.c b/submodule.c
index 48e3b44e21..c3a61e70f9 100644
--- a/submodule.c
+++ b/submodule.c
@@ -544,10 +544,7 @@ static int push_submodule(const char *path)
int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name)
{
int i, ret = 1;
- struct string_list needs_pushing;
-
- memset(&needs_pushing, 0, sizeof(struct string_list));
- needs_pushing.strdup_strings = 1;
+ struct string_list needs_pushing = STRING_LIST_INIT_DUP;
if (!find_unpushed_submodules(new_sha1, remotes_name, &needs_pushing))
return 1;