Merge branch 'ps/no-writable-strings'
Building with "-Werror -Wwrite-strings" is now supported. * ps/no-writable-strings: (27 commits) config.mak.dev: enable `-Wwrite-strings` warning builtin/merge: always store allocated strings in `pull_twohead` builtin/rebase: always store allocated string in `options.strategy` builtin/rebase: do not assign default backend to non-constant field imap-send: fix leaking memory in `imap_server_conf` imap-send: drop global `imap_server_conf` variable mailmap: always store allocated strings in mailmap blob revision: always store allocated strings in output encoding remote-curl: avoid assigning string constant to non-const variable send-pack: always allocate receive status parse-options: cast long name for OPTION_ALIAS http: do not assign string constant to non-const field compat/win32: fix const-correctness with string constants pretty: add casts for decoration option pointers object-file: make `buf` parameter of `index_mem()` a constant object-file: mark cached object buffers as const ident: add casts for fallback name and GECOS entry: refactor how we remove items for delayed checkouts line-log: always allocate the output prefix line-log: stop assigning string constant to file parent buffer ...
This commit is contained in:
@ -582,11 +582,16 @@ static struct ref *get_ref_map(struct remote *remote,
|
||||
}
|
||||
}
|
||||
|
||||
if (tags == TAGS_SET)
|
||||
if (tags == TAGS_SET) {
|
||||
struct refspec_item tag_refspec;
|
||||
|
||||
/* also fetch all tags */
|
||||
get_fetch_map(remote_refs, tag_refspec, &tail, 0);
|
||||
else if (tags == TAGS_DEFAULT && *autotags)
|
||||
refspec_item_init(&tag_refspec, TAG_REFSPEC, 0);
|
||||
get_fetch_map(remote_refs, &tag_refspec, &tail, 0);
|
||||
refspec_item_clear(&tag_refspec);
|
||||
} else if (tags == TAGS_DEFAULT && *autotags) {
|
||||
find_non_local_tags(remote_refs, NULL, &ref_map, &tail);
|
||||
}
|
||||
|
||||
/* Now append any refs to be updated opportunistically: */
|
||||
*tail = orefs;
|
||||
|
||||
Reference in New Issue
Block a user